Map resize correction + player focus + cleaning

This commit is contained in:
Sebastien Riviere
2025-09-04 18:58:41 +02:00
parent 31c43f6361
commit d0a3351f55
12 changed files with 132 additions and 116 deletions

View File

@@ -0,0 +1,15 @@
import { GameState } from './types';
import { teamStatus } from './configurations';
export function getStatus(team, gamestate) {
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.captured : teamStatus.playing;
}
}