public GameResult NextRound(Choice playerChoice, Choice aiChoice) { var gameResult = ChooseWinner(playerChoice, aiChoice); var currentRound = new GameRound { PlayerChoice = playerChoice, AiChoice = aiChoice, Result = gameResult, RoundCount = ++Round }; switch (gameResult) { case GameResult.Win: Score.PlayerWins++; break; case GameResult.Lose: Score.AiWins++; break; case GameResult.Draw: Score.Draws++; break; default: throw new ArgumentOutOfRangeException(); } History.Add(currentRound); return(gameResult); }
public void Add(GameRound round) { Rounds.Add(round); }