aboutsummaryrefslogtreecommitdiff
path: root/planetwars-matchrunner/src/pw_match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-matchrunner/src/pw_match.rs')
-rw-r--r--planetwars-matchrunner/src/pw_match.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/planetwars-matchrunner/src/pw_match.rs b/planetwars-matchrunner/src/pw_match.rs
index 4af215e..c5650f7 100644
--- a/planetwars-matchrunner/src/pw_match.rs
+++ b/planetwars-matchrunner/src/pw_match.rs
@@ -39,7 +39,7 @@ impl PwMatch {
}
}
- pub async fn run(&mut self) {
+ pub async fn run(mut self) -> PlanetWars {
// log initial state
self.log_game_state();
@@ -53,6 +53,9 @@ impl PwMatch {
self.match_state.step();
self.log_game_state();
}
+
+ self.match_ctx.shutdown().await;
+ self.match_state
}
async fn prompt_players(&mut self) -> Vec<(usize, RequestResult<Vec<u8>>)> {