Add draw requests and rematches

This commit is contained in:
sepia 2025-07-22 20:44:06 -05:00
parent 1a221bf680
commit 2f46d86947
6 changed files with 297 additions and 7 deletions

View file

@ -100,6 +100,12 @@ export class GomokuGame {
}
}
public declareDraw() {
this.status = 'finished';
this.winnerColor = 'draw';
this.currentPlayerColor = null;
}
private checkWin(row: number, col: number, color: PlayerColor): boolean {
const directions = [
[1, 0], // vertical