Example #1
0
 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();
 }
Example #2
0
        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);
        }
Example #3
0
        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());
        }