예제 #1
0
파일: Game.cs 프로젝트: TyrikM/BJ
        // ctors
        public Game(int _money, short decksQty)
        {
            if (decksQty < 1 && decksQty > 4)
            {
                throw new Exception("Invalid input for shoes");
            }
            else if (_money <= 0)
            {
                throw new Exception("Invalid input for deposit");
            }

            money = _money;
            shoes = new Shoes(decksQty);
        }
예제 #2
0
        public static void GameStats(Player player, Dealer dealer, Shoes shoes, int gameNumber)
        {
            Console.Clear();
            Console.WriteLine("Players' name: {0}", player.Name);
            Console.WriteLine(new string('-', 15 + player.Name.Length));
            Console.WriteLine("Your cash: {0}$", player.Money);
            Console.WriteLine(new string('-', 17) + "\nGame #{0}", gameNumber);
            Console.WriteLine("Current bet: {0}$", player.CurrentBet);
            Console.WriteLine("Cards in shoes: {0}", ShoesServ.CountCardsInShoes(shoes));

            Console.WriteLine("Dealers' cards: ");
            PrintCurrentCards(dealer);
            Console.WriteLine("Players' cards:");
            PrintCurrentCards(player);

            Console.WriteLine(new string('-', 17));
        }
예제 #3
0
 public Game(short decksQty, Player _player)
 {
     player = _player;
     shoes  = ShoesServ.CreateShoes(decksQty);
 }