Feat: Add temporary 2x brightness highlight for last move

This commit is contained in:
2025-12-23 22:02:04 +11:00
parent d1bcf36887
commit 74de333006
2 changed files with 12 additions and 2 deletions

View File

@@ -519,8 +519,13 @@ class MultiplayerClient {
const cell = this.game.boardElement.children[cellIndex];
if (cell) {
cell.classList.add('occupied', data.symbol.toLowerCase());
cell.classList.add('occupied', data.symbol.toLowerCase(), 'latest-move');
this.game.board[data.row][data.col] = data.symbol;
// Remove brightness boost after 2 seconds
setTimeout(() => {
if (cell) cell.classList.remove('latest-move');
}, 2000);
}
// It's now my turn