Esempio n. 1
0
        private void ShowPlayersCards(Croupier croupier, Player gamer)
        {
            PrintInfo.PrintOtherMes(TypeMessage.CardCroupier);
            PrintInfo.PrintCards(croupier.PlayerCards);
            PrintInfo.PrintSpot(PlayerSpot(croupier));

            PrintInfo.PrintOtherMes(TypeMessage.CardPlayer);
            PrintInfo.PrintCards(gamer.PlayerCards);
            PrintInfo.PrintSpot(PlayerSpot(gamer));
        }
Esempio n. 2
0
 private void StepCoupier()
 {
     // Croupier must say enough while spot more then 17 point
     while (_croupier.State == StatusPlayer.Play)
     {
         if (PlayerSpot(_croupier) > 17)
         {
             _croupier.State = StatusPlayer.Enough;
             break;
         }
         PrintInfo.PrintOtherMes(TypeMessage.StepCroupier);
         GiveCard(_croupier, 1);
         ShowPlayersCards(_croupier, _gamer);
     }
 }
Esempio n. 3
0
        private ConsoleKeyInfo ChooseGamerDraw()
        {
            ConsoleKeyInfo cki;

            while (true)
            {
                PrintInfo.PrintOtherMes(TypeMessage.FinishRound);
                cki = WorkKey.GetPressKey();
                if (WorkKey.CompareKey(cki, ConsoleKey.Y) || WorkKey.CompareKey(cki, ConsoleKey.N))
                {
                    break;
                }
            }
            return(cki);
        }
Esempio n. 4
0
        private void StepGamer()
        {
            ConsoleKeyInfo cki;

            while (_gamer.State == StatusPlayer.Play)
            {
                PrintInfo.PrintOtherMes(TypeMessage.MenuPlayer);
                cki = WorkKey.GetPressKey();
                //Gamer take one card
                if (WorkKey.CompareKey(cki, ConsoleKey.F5))
                {
                    StepGamerTakeOneCard(_gamer);
                }
                //Gamer refuse one card
                if (WorkKey.CompareKey(cki, ConsoleKey.F6))
                {
                }
                // Gamer say Enough
                if (WorkKey.CompareKey(cki, ConsoleKey.F7))
                {
                    _gamer.State = StatusPlayer.Enough;
                }
            }
        }
Esempio n. 5
0
 private void CroupierTakeSecondCard()
 {
     PrintInfo.PrintOtherMes(TypeMessage.StepCroupier);
     GiveCard(_croupier, 1);
     ShowPlayersCards(_croupier, _gamer);
 }