コード例 #1
0
        protected override void StartGameCore()
        {
            BlackJackConsoleWriter.WriteTitle();

            var blackJackHandler = new BlackJackHandler(new Player(GetName()));

            BlackJackConsoleWriter.GreetPlayer(blackJackHandler.Player.Name);
            blackJackHandler.InitialiseGame();

            TryRestartGame();
        }
コード例 #2
0
ファイル: BlackJackHandler.cs プロジェクト: kaathryyn/CLGames
        public void RequestNextRound()
        {
            BlackJackConsoleWriter.AskToPlayNextRound();
            var response = Console.ReadLine();

            switch (response)
            {
            case "y":
                RefreshHandsAndDeck();
                InitialiseGame();
                break;

            case "n":
                GameIsOngoing = false;
                break;

            default:
                BlackJackConsoleWriter.GreetPlayer(Player.Name);
                break;
            }
        }