Fix variable scope: Ensure global access to game and multiplayer client

This commit is contained in:
2025-12-13 20:34:07 +11:00
parent dbc3f40019
commit b57611f0c4
3 changed files with 22 additions and 9 deletions

View File

@@ -248,7 +248,8 @@ class Connect5Game {
}
// Initialize game when DOM is loaded
let game;
// Initialize game when DOM is loaded
window.game = null;
document.addEventListener("DOMContentLoaded", () => {
game = new Connect5Game();
window.game = new Connect5Game();
});