private void RenderBothHands(Model.IHands hands) { Console.Write("Player: "); RenderHand(hands.PlayerCards, hands.PlayerScore); Console.Write("Dealer: "); RenderHand(hands.DealerCards, hands.DealerScore); }
public void PlayGame() { Game.DealNewHand(); while (Game.IsGameOver() == false) { Model.IHands hands = Game.GetHands(); GameView.RenderPlayersHands(hands); GameView.RenderGameActionChoices(); switch (GameView.GetGameAction()) { case View.GameAction.Hit: Game.Hit(); break; case View.GameAction.Stay: Game.DealerTakeCards(); Game.SetPlayerHasStayedTrue(); break; } } GameView.RenderResultOfGame(Game.GetHands()); }
public void RenderResultOfGame(Model.IHands hands) { RenderBothHands(hands); Console.WriteLine((hands.PlayerScore > hands.DealerScore && hands.PlayerScore < 22) || hands.DealerScore > 21 ? "Player wins!!" : "Dealer wins!!"); }
public void RenderPlayersHands(Model.IHands hands) { RenderBothHands(hands); }