This commit is contained in:
ntr
2019-12-22 15:57:48 +10:00
parent 1cc29f73d1
commit 445e8084e0
9 changed files with 512 additions and 315 deletions
+1 -1
View File
@@ -144,8 +144,8 @@ impl Instance {
.collect::<Vec<Uuid>>()
}
// time out lobbies that have been open too long
pub fn upkeep(mut self) -> (Instance, Option<Game>) {
// time out lobbies that have been open too long
if self.phase == InstancePhase::Lobby && self.phase_timed_out() {
self.finish();
return (self, None);
+5
View File
@@ -31,6 +31,11 @@ pub fn bot_player() -> Player {
Player::new(bot_id, None, &name(), constructs).set_bot(true)
}
pub fn anon_player(id: Uuid) -> Player {
let constructs = instance_mobs(id);
Player::new(id, None, &"player".to_string(), constructs)
}
pub fn anim_test_game(skill: Skill) -> Game {
let mut rng = thread_rng();
let mut game = Game::new();