🔥 Simplify adding turns
continuous-integration/drone/push Build is passing Details

pull/88/head
Alexis Drai 3 years ago
parent 3631af4e8a
commit 295d43e3ce

@ -97,22 +97,16 @@ namespace Model.Games
player, player,
ThrowAll() ThrowAll()
); );
if(AddTurn(turn) == null) AddTurn(turn);
{
// log an error onc we have a logger ?
Debug.WriteLine("tried to add two identical turns: " + turn);
}
} }
private Turn AddTurn(Turn turn) private void AddTurn(Turn turn)
{ {
if (!(turns.Contains(turn))) if (!(turns.Contains(turn)))
{ {
turns.Add(turn); turns.Add(turn);
return turn;
} }
return null;
} }
/// <summary> /// <summary>

Loading…
Cancel
Save