From 45aad71939b2227e4e3a58a9457f1a825ff9b9cc Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 27 Oct 2019 14:57:27 +1100 Subject: [PATCH] changelog --- CHANGELOG.md | 1 - server/src/instance.rs | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 }