Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine(GameTitle);
            Game game = new Game();

            GameProvider.FirstDistribution(game.player, game.diller);
        }
Beispiel #2
0
 internal void GotABlackJack(Gambler player, Gambler diller)
 {
     if (IsAceOnHend(player.playerCards) & IsFigureOnHend(player.playerCards))
     {
         MoneyService.BlackJackWinnings(player);
         GameProvider.NewGameSelector(player, diller);
     }
 }
Beispiel #3
0
        private void CheckAllConditions(Gambler player, Gambler diller)
        {
            if (player.PlayerPoint > diller.PlayerPoint & !player.IsLoose)
            {
                Console.WriteLine($"{player.Name} Victory!!!");
                MoneyService.ClasicWinnings(player);
                GameProvider.NewGameSelector(player, diller);
                return;
            }

            DillerVictory(player, diller);
        }
Beispiel #4
0
        internal void CheckVictoryConditions(Gambler player, Gambler diller)
        {
            if (player.IsLoose & diller.IsLoose || player.PlayerPoint == diller.PlayerPoint)
            {
                Console.WriteLine($"{player.Name} and {diller.Name} dead heat !!!");
                player.Cash += player.Bet;
                GameProvider.NewGameSelector(player, diller);
                return;
            }

            CheckAllConditions(player, diller);
        }
Beispiel #5
0
        internal void EnterBet(Gambler player, Gambler diller)
        {
            if (MoneyCounter(player))
            {
                Console.WriteLine($"You have {player.Cash}. Enter you bet");
                BetCounter(player, diller);
                return;
            }

            GoForTheMoney(player, diller);
            GameProvider.NewGameSelector(player, diller);
        }
        internal void DillerTurn(Gambler diller, Gambler player)
        {
            if (diller.PlayerPoint < GamblerConst.DillerMaxHandPoint)
            {
                GameProvider.NextTurnGame(diller, player);
                return;
            }

            diller.IsLoose = VictoryConditions.IsLosing(diller);
            diller.EndTurn = true;
            GameProvider.ExitGame(player, diller);
        }
Beispiel #7
0
        private void DillerVictory(Gambler player, Gambler diller)
        {
            if (!diller.IsLoose)
            {
                Console.WriteLine($"{player.Name} Bust! The game is over");
                GameProvider.NewGameSelector(player, diller);
                return;
            }

            Console.WriteLine($"{diller.Name} Bust! The game is over");
            MoneyService.ClasicWinnings(player);
            GameProvider.NewGameSelector(player, diller);
        }