Skip to content

Commit ada2153

Browse files
committed
Refactor player selection timeout handling for clarity
1 parent b63d770 commit ada2153

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

backend/src/game/game_manager.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,18 @@ const PlayerSelect: GameState<void, number> = {
6262
description: "Player selection timed out, resetting game.",
6363
date: new Date().toString()
6464
});
65-
return {
66-
canContinue: true,
67-
subsequentState: CleanUp,
68-
output: 0 // Indicating that the game should start instantly
69-
}
7065
} else {
7166
GameManager.raiseError({
7267
errorType: ErrorType.WARNING,
7368
description: "Unknown error during player selection",
7469
date: new Date().toString()
7570
});
76-
return {
77-
canContinue: false,
78-
subsequentState: null,
79-
output: -1
80-
}
71+
72+
}
73+
return {
74+
canContinue: true,
75+
subsequentState: CleanUp,
76+
output: 0 // Indicating that the game should not start instantly
8177
}
8278

8379
}

0 commit comments

Comments
 (0)