refactor: remove debug logging from handleConnected and renderRoom functions
All checks were successful
Build and Push Docker Image / docker (push) Successful in 7s

This commit is contained in:
2025-09-05 15:26:16 +02:00
parent de2c7b0a3a
commit 74d9ae81e6
2 changed files with 0 additions and 14 deletions

View File

@@ -104,24 +104,12 @@ export function renderRoom(room) {
}
$readyChk.parentElement.classList.toggle('hidden', room.state.status !== 'lobby');
}
console.log('room host id:', room.hostId, 'my id:', state.playerId);
const isHost = state.playerId === room.hostId;
const activePlayers = room.players.filter((p) => !p.spectator && p.connected);
const allReady = activePlayers.length > 0 && activePlayers.every((p) => p.ready);
console.log('room state status:', room.state.status, 'host:', isHost, 'allReady:', allReady);
const canStart = room.state.status === 'lobby' && isHost && allReady;
console.log(
`Rendering room ${room.id}, players: ${room.players.length}, active: ${activePlayers.length}, ready: ${allReady}, isHost: ${isHost}`
);
console.log('Me:', me);
console.log('Pending ready:', state.pendingReady);
console.log('Room state:', room.state);
console.log('My timeline:', myTl);
console.log('CanStart:', canStart);
if ($startGame) $startGame.classList.toggle('hidden', !canStart);
const isMyTurn =