refactor: remove debug logging from handleConnected and renderRoom functions
All checks were successful
Build and Push Docker Image / docker (push) Successful in 7s
All checks were successful
Build and Push Docker Image / docker (push) Successful in 7s
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user