started working on zone manager for backend

This commit is contained in:
2024-04-10 19:11:51 +00:00
parent 846d12078d
commit 0ad4032a9b
5 changed files with 119 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export default class Game {
constructor() {
this.teams = [];
this.state = GameState.SETUP;
this.zone = new ZoneManager(null, null)
}
setState(newState) {
@@ -150,4 +151,12 @@ export default class Game {
}
return false;
}
setZone(newSettings) {
//cannot change zones while playing
if(game.state == GameState.PLAYING || game.state == GameState.FINISHED) {
return false;
}
this.zone.udpateSettings(newSettings)
}
}