This commit is contained in:
Sebastien Riviere
2025-09-08 15:08:44 +02:00
parent 75f8b10ecd
commit 7e4d9f910a
37 changed files with 403 additions and 435 deletions

View File

@@ -2,6 +2,7 @@ import { GameState } from './types';
import { teamStatus } from './configurations';
export function getStatus(team, gamestate) {
if (!team) return null;
switch (gamestate) {
case GameState.SETUP:
return teamStatus.waiting;
@@ -11,5 +12,7 @@ export function getStatus(team, gamestate) {
return team.captured ? teamStatus.captured : team.outofzone ? teamStatus.outofzone : teamStatus.playing;
case GameState.FINISHED:
return team.captured ? teamStatus.captured : teamStatus.playing;
default:
return teamStatus.default;
}
}