private void Gamewindow_Load(object sender, EventArgs e) { player1_label.Text = currentgame.getPlayer().getName(); player1chips_label.Text = Convert.ToString(currentgame.getPlayer().getCurrentChips()); ai_label.Text = currentgame.getAiPlayer().getName(); aiplayerchips_label.Text = Convert.ToString(currentgame.getAiPlayer().getCurrentChips()); currentgame.initiateGameWindow(this); currentgame.newRound(); }
private void start_button_Click(object sender, EventArgs e) { Console.WriteLine("Start game clicked"); Game game = new Game(enteredchips, enteredname); Console.WriteLine("Buy-in: " + game.getChips()); Console.WriteLine("Small Blind: " + game.getSmallBlind()); Console.WriteLine("Big Blind: " + game.getBigBlind()); Console.WriteLine("Player: " + enteredname); Console.WriteLine(game.getPlayer().getName()); Console.WriteLine(game.getPlayer().getCurrentChips()); this.Hide(); Gamewindow gamewindow = new Gamewindow(game); gamewindow.ShowDialog(); }
public void resetCards() { Console.WriteLine("Reset"); currentgame.getPlayer().getHand().Clear(); currentgame.getAiPlayer().getHand().Clear(); string backcard = "BackofCard.png"; string path_backcard = Path.Combine(path, backcard); gamewindow.changePictureBox(gamewindow.player_card1, path_backcard); gamewindow.changePictureBox(gamewindow.player_card2, path_backcard); gamewindow.changePictureBox(gamewindow.ai_card1, path_backcard); gamewindow.changePictureBox(gamewindow.ai_card2, path_backcard); gamewindow.changePictureBox(gamewindow.flop_1, path_backcard); gamewindow.changePictureBox(gamewindow.flop_2, path_backcard); gamewindow.changePictureBox(gamewindow.flop_3, path_backcard); gamewindow.changePictureBox(gamewindow.turn, path_backcard); gamewindow.changePictureBox(gamewindow.river, path_backcard); }
public void gatherHands() { playerCards.Clear(); AiCards.Clear(); //Add card combination for the player playerCards.AddRange(game.getPlayer().getHand()); playerCards.AddRange(game.getDealer().getFlop()); playerCards.Add(game.getDealer().getTurn()); playerCards.Add(game.getDealer().getRiver()); //Add card combination for the AIplayer AiCards.AddRange(game.getAiPlayer().getHand()); AiCards.AddRange(game.getDealer().getFlop()); AiCards.Add(game.getDealer().getTurn()); AiCards.Add(game.getDealer().getRiver()); }