Restructuration of the project folders

This commit is contained in:
Sebastien Riviere
2026-02-13 16:06:50 +01:00
parent 5f16500634
commit c1f1688794
188 changed files with 265 additions and 301 deletions

View File

@@ -0,0 +1,18 @@
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;
case GameState.PLACEMENT:
return team.ready ? teamStatus.ready : teamStatus.notready;
case GameState.PLAYING:
return team.captured ? teamStatus.captured : team.outOfZone ? teamStatus.outofzone : teamStatus.playing;
case GameState.FINISHED:
return team.captured ? teamStatus.defeat : teamStatus.victory;
default:
return teamStatus.default;
}
}