wip
This commit is contained in:
parent
8e012cd5ea
commit
e908ed9a35
@ -188,6 +188,8 @@ impl Instance {
|
|||||||
|
|
||||||
fn vbox_phase_start(&mut self) -> &mut Instance {
|
fn vbox_phase_start(&mut self) -> &mut Instance {
|
||||||
self.phase = InstancePhase::Vbox;
|
self.phase = InstancePhase::Vbox;
|
||||||
|
|
||||||
|
self.players.iter_mut().for_each(|p| p.ready = false);
|
||||||
self.generate_rounds();
|
self.generate_rounds();
|
||||||
self.bot_vbox_phase();
|
self.bot_vbox_phase();
|
||||||
|
|
||||||
@ -682,10 +684,13 @@ mod tests {
|
|||||||
|
|
||||||
instance.add_player(player);
|
instance.add_player(player);
|
||||||
|
|
||||||
|
assert_eq!(instance.phase, InstancePhase::Open);
|
||||||
instance.player_ready(a_id).expect("a ready");
|
instance.player_ready(a_id).expect("a ready");
|
||||||
assert!(!instance.can_start());
|
assert!(!instance.can_start());
|
||||||
|
|
||||||
instance.player_ready(b_id).expect("b ready");
|
instance.player_ready(b_id).expect("b ready");
|
||||||
assert!(instance.can_start());
|
assert_eq!(instance.phase, InstancePhase::Vbox);
|
||||||
|
|
||||||
|
assert!(!instance.can_start());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user