diff --git a/CHANGELOG.md b/CHANGELOG.md index 009c5d41..01b06b18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). - ## [1.6.5] - 2019-10-27 # Added - Offering of draws diff --git a/server/src/instance.rs b/server/src/instance.rs index 07498300..2e65b9d6 100644 --- a/server/src/instance.rs +++ b/server/src/instance.rs @@ -340,6 +340,13 @@ impl Instance { pub fn finish(&mut self) -> &mut Instance { self.phase = InstancePhase::Finished; + + for player in self.players.iter() { + if player.score == Score::Win { + self.winner = Some(player.id); + } + } + self }