void StartCircle() { PlayerServ.AddCard(player, ShoesServ.GetNextCard(shoes)); PlayerServ.AddCard(dealer, ShoesServ.GetNextCard(shoes)); while (true) { ConsoleCommand.GameStats(player, dealer, shoes, gameNumber); if (ConsoleCommand.NextCard()) { PlayerServ.AddCard(player, ShoesServ.GetNextCard(shoes)); continue; } break; } PlayerServ.AddCard(dealer, ShoesServ.GetNextCard(shoes)); ConsoleCommand.GameStats(player, dealer, shoes, gameNumber); WhosWin(player, dealer); PlayerServ.ClearCards(player); PlayerServ.ClearCards(dealer); }
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)); }
public Game(short decksQty, Player _player) { player = _player; shoes = ShoesServ.CreateShoes(decksQty); }