From 295d43e3cef50f7a364511071fd26381f4aef72b Mon Sep 17 00:00:00 2001 From: "alexis.drai" Date: Wed, 28 Sep 2022 11:18:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Simplify=20adding=20turns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Model/Games/Game.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Sources/Model/Games/Game.cs b/Sources/Model/Games/Game.cs index e3eef59..ba75d6a 100644 --- a/Sources/Model/Games/Game.cs +++ b/Sources/Model/Games/Game.cs @@ -97,22 +97,16 @@ namespace Model.Games player, ThrowAll() ); - if(AddTurn(turn) == null) - { - // log an error onc we have a logger ? - Debug.WriteLine("tried to add two identical turns: " + turn); - } + AddTurn(turn); } - private Turn AddTurn(Turn turn) + private void AddTurn(Turn turn) { if (!(turns.Contains(turn))) { turns.Add(turn); - return turn; } - return null; } ///