diff --git a/core/src/game.rs b/core/src/game.rs index 2ee6de59..5eded020 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -189,9 +189,9 @@ impl Game { } self.pve_add_skills(); - if self.skill_phase_finished() { // pve game where both bots will have readied up - return self.resolve_phase_start() - } + //if self.skill_phase_finished() { // pve game where both bots will have readied up + // return self.resolve_phase_start() + //} self } @@ -201,8 +201,7 @@ impl Game { let mut rng = thread_rng(); for mobs in self.players - .iter() - .filter(|t| t.bot) { + .iter() { let player_player = self.players.iter().find(|t| t.id != mobs.id).unwrap(); for mob in mobs.constructs.iter() { diff --git a/core/src/instance.rs b/core/src/instance.rs index 79467015..3888b5dd 100644 --- a/core/src/instance.rs +++ b/core/src/instance.rs @@ -55,9 +55,9 @@ impl TimeControl { fn game_time_seconds(&self) -> i64 { match self { - TimeControl::Standard => 60, - TimeControl::Slow => 120, - TimeControl::Practice => panic!("practice game seconds called"), + TimeControl::Standard => 1, + TimeControl::Slow => 1, + TimeControl::Practice => 1, } } @@ -77,12 +77,9 @@ impl TimeControl { } pub fn game_phase_end(&self, resolution_time_ms: i64) -> Option> { - match self { - TimeControl::Practice => None, - _ => Some(Utc::now() - .checked_add_signed(Duration::milliseconds(self.game_time_seconds() * 1000 + resolution_time_ms)) - .expect("could not set game phase end")), - } + Some(Utc::now() + .checked_add_signed(Duration::milliseconds(self.game_time_seconds() * 1000 + resolution_time_ms)) + .expect("could not set game phase end")) } }