()
| 1 | import { createBoard, playMove } from "./connect4.js"; |
| 2 | |
| 3 | function getWebSocketServer() { |
| 4 | if (window.location.host === "python-websockets.github.io") { |
| 5 | return "wss://websockets-tutorial.koyeb.app/"; |
| 6 | } else if (window.location.host === "localhost:8000") { |
| 7 | return "ws://localhost:8001/"; |
| 8 | } else { |
| 9 | throw new Error(`Unsupported host: ${window.location.host}`); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | function initGame(websocket) { |
| 14 | websocket.addEventListener("open", () => { |
no outgoing calls
no test coverage detected
searching dependent graphs…