/// <summary> /// If all dice have been used, make a new set of dice and save score in from this hand to the total. /// </summary> // Todo: Unit test public void ReconcileHand() { if (Dice.Count > 0) { return; } else if (Dice.Count < 0) { throw new InvalidOperationException("Negative amount of dice, this should not be possible."); } else { Dice = new List <int> { 0, 0, 0, 0, 0, 0 }; _savedScore += _collectedDice.Score; _collectedDice = new CollectedDice(); } }
public void Clear() { _savedScore = 0; _collectedDice = new CollectedDice(); }