lobby list

This commit is contained in:
ntr
2019-04-25 14:43:29 +10:00
parent fcb224f341
commit eb2089cc17
10 changed files with 54 additions and 25 deletions
+12 -6
View File
@@ -135,12 +135,18 @@ impl Instance {
self.players[i].set_ready(true);
if self.all_ready() {
match self.phase {
InstancePhase::Open => self.start(),
InstancePhase::Vbox => self.games_phase_start(),
_ => panic!("unhandled ready phase"),
};
match self.phase {
InstancePhase::Open => {
if self.can_start() {
self.start();
}
},
InstancePhase::Vbox =>
if self.all_ready() {
self.games_phase_start();
}
},
_ => panic!("unhandled ready phase"),
}
Ok(self)