mirror of
https://github.com/DeNNiiInc/Connect-5.git
synced 2026-04-17 20:36:00 +00:00
Fix: Add missing socket listeners and fix database calls for surrender/rematch
- server.js: Added missing listeners for surrender, send_rematch, accept_rematch, decline_rematch events (previously missing, causing features to simple do nothing) - gameManager.js: Removed invalid calls to non-existent incrementWins/incrementLosses methods (abandonGame already handles this internally)
This commit is contained in:
@@ -472,10 +472,6 @@ class GameManager {
|
||||
try {
|
||||
await this.db.abandonGame(data.gameId, winnerId);
|
||||
|
||||
// Update player stats
|
||||
await this.db.incrementLosses(player.id);
|
||||
await this.db.incrementWins(winnerId);
|
||||
|
||||
// Get updated stats
|
||||
const loserStats = await this.db.getPlayerById(player.id);
|
||||
const winnerStats = await this.db.getPlayerById(winnerId);
|
||||
|
||||
Reference in New Issue
Block a user