/// <summary> /// After receiving confirmation from the game, account the last action. /// </summary> private void AccountLastAction() { var diceSet = Scoring.DetermineScore(lastKeptDices); switch (currentAction) { case PlayerAction.Score: diceSet = Scoring.DetermineScore(lastKeptDices); currentTurnState.Score += diceSet.Score; totalScore += currentTurnState.Score; break; case PlayerAction.Keep: diceSet = Scoring.DetermineScore(lastKeptDices); currentTurnState.Score += diceSet.Score; foreach (var dice in lastKeptDices) { dice.Kept = true; } if (currentTurnState.Dices.TrueForAll(dice => dice.Kept)) { currentTurnState.ResetDices(); } break; } }