lobby list
This commit is contained in:
+12
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user