aboutsummaryrefslogtreecommitdiff
path: root/planetwars-matchrunner/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-matchrunner/src/lib.rs')
-rw-r--r--planetwars-matchrunner/src/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/planetwars-matchrunner/src/lib.rs b/planetwars-matchrunner/src/lib.rs
index d26e810..50cff70 100644
--- a/planetwars-matchrunner/src/lib.rs
+++ b/planetwars-matchrunner/src/lib.rs
@@ -106,11 +106,9 @@ pub async fn run_match(config: MatchConfig) -> MatchOutcome {
// )
// .unwrap();
- let mut match_state = pw_match::PwMatch::create(match_ctx, pw_config);
- match_state.run().await;
+ let final_state = pw_match::PwMatch::create(match_ctx, pw_config).run().await;
- let final_state = match_state.match_state.state();
- let survivors = final_state.living_players();
+ let survivors = final_state.state().living_players();
let winner = if survivors.len() == 1 {
Some(survivors[0])
} else {