From 450d22758ec169ece8f71bc6bd6c79603c136874 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 27 Apr 2022 20:08:48 +0200 Subject: return winner when running a match --- planetwars-matchrunner/src/pw_match.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'planetwars-matchrunner/src/pw_match.rs') diff --git a/planetwars-matchrunner/src/pw_match.rs b/planetwars-matchrunner/src/pw_match.rs index c9a7f7b..f5b803c 100644 --- a/planetwars-matchrunner/src/pw_match.rs +++ b/planetwars-matchrunner/src/pw_match.rs @@ -24,8 +24,8 @@ pub struct MatchConfig { } pub struct PwMatch { - match_ctx: MatchCtx, - match_state: PlanetWars, + pub match_ctx: MatchCtx, + pub match_state: PlanetWars, } impl PwMatch { @@ -39,7 +39,7 @@ impl PwMatch { } } - pub async fn run(mut self) { + pub async fn run(&mut self) { while !self.match_state.is_finished() { let player_messages = self.prompt_players().await; -- cgit v1.2.3