Add surrender and rematch UI - Part 1

- Add surrender button to game controls
- Add game-over modal with stats and rematch option
- Add surrender confirmation modal
- Add all CSS styling for new modals and buttons
- Add surrender-rematch.js with global helper functions
- Update multiplayer.js constructor to track opponent for rematch
This commit is contained in:
2025-12-22 17:39:43 +11:00
parent 6c4aedec1d
commit 622a7e4094
5 changed files with 554 additions and 70 deletions

View File

@@ -10,6 +10,9 @@ class MultiplayerClient {
this.activePlayers = [];
this.pendingChallenges = new Map();
this.selectedBoardSize = 15; // Default board size for multiplayer
this.opponent = null; // Track opponent for rematch
this.opponentId = null;
this.lastGameResult = null;
}