private void CroupierAction(Croupier croupier) { do { PlayerGetCard(croupier, PullOutCard()); RecalculateScore(croupier); } while (croupier.Score < Constants.Croupier_Constants.TAKE_UNTIL); }
static void Main(string[] args) { Croupier croupier = new Croupier(); bool wantsToPlay = true; string input = ""; string result = ""; Console.WriteLine("Viel Glück beim Black Jack."); while (wantsToPlay) { Console.WriteLine("Karte ziehen oder aufhören? (j/n)"); input = Console.ReadLine(); if (input.Equals("j")) { croupier.HandOutCard(); result = croupier.CheckValue(); if (result.Equals("verloren")) { wantsToPlay = false; Console.WriteLine("Du hast verloren."); croupier.ShowCards(); } else if (result.Equals("gewonnen")) { wantsToPlay = false; Console.WriteLine("Du hast gewonnen."); croupier.ShowCards(); } else if (result.Equals("weiter")) { croupier.ShowPlayerCards(); } } else if (input.Equals("n")) { wantsToPlay = false; result = croupier.MakeEndCheck(); if (result.Equals("verloren")) { Console.WriteLine("Du hast verloren."); } else if (result.Equals("gewonnen")) { Console.WriteLine("Du hast gewonnen."); } else if (result.Equals("unentschieden")) { Console.WriteLine("Das Spiel endet unentschieden."); } croupier.ShowCards(); } else { Console.WriteLine("Geben Sie bitte \"j\" oder \"n\" ein."); } } }
public void SetData(List <User> players, Croupier croupier, int gamesCount, int decksCount, MainView mainView) { this.players = players; this.croupier = croupier; GenerateDecks(decksCount); this.mainView = mainView; this.decksCount = decksCount; this.gamesCount = gamesCount; gameResults = new List <GameResult>(gamesCount); gameId = 0; this.random = new Random(); }
static void Main(string[] args) { List <User> users = new List <User>() { new User("Vasya", 200), new Bot("CalmBot", 200, Enums.Bot_Enums.Bot_Demeanor.Safe), new Bot("NormalBot", 200, Enums.Bot_Enums.Bot_Demeanor.Normal), new Bot("DesperateBot", 200, Enums.Bot_Enums.Bot_Demeanor.Desperate) }; Croupier croupier = new Croupier(); MainView mainView = new MainView(); GameController.GetInstance().SetData(users, croupier, 4, 1, mainView); GameController.GetInstance().StartGames(); Console.Read(); }
public void PlayerGetCard(Croupier croupier, Card card) { croupier.Cards.Add(card); croupier.Score += card.GetCost(); mainView.ShowCroupierCardGetting(); }
private void StartCroupierTurn(Croupier croupier) { Console.WriteLine("Croupier get a turn"); CroupierAction(croupier); }
public void DrawCroupier(Croupier croupier) { WriteLine("\n<=================================>\nCroupier"); DrawHand(croupier.Cards); WriteLine("<=================================>\n"); }
public MesaBlackJack() { Croupier = new Croupier(); Apostadores = new List <Apostador>(); }