diff --git a/client/src/Board.js b/client/src/Board.js index 2412a42..1edbd99 100644 --- a/client/src/Board.js +++ b/client/src/Board.js @@ -24,8 +24,6 @@ const borderImageWidth = (2 + 2/3) * tileImageWidth, /* 2.667 * .Tile.width */ borderImageHeight = borderImageWidth * 0.29; /* 0.29 * .Border.height */ -let hack = undefined; - const Board = () => { const { ws } = useContext(GlobalContext); const board = useRef(); @@ -144,10 +142,6 @@ const Board = () => { const refWsMessage = useRef(onWsMessage); useEffect(() => { refWsMessage.current = onWsMessage; }); useEffect(() => { - if (ws !== hack) { - console.log(`board - setting out-of-scope hack`); - hack = ws; - } if (!ws) { return; } console.log('board - bind'); const cbMessage = e => refWsMessage.current(e); @@ -221,7 +215,6 @@ const Board = () => { } else { type = 'place-settlement'; } - if (!hack) { console.error(`board - onCornerClicked - ws is NULL`); return; } ws.send(JSON.stringify({ type, index: corner.index }));