Example #1
0
        /// <summary>
        ///     Deal initial cards to players
        /// </summary>
        public void SetUpHole()
        {
            for (var i = 0; i < 2; ++i)
            //Simulate passing one card out at a time, going around the circle of players 2 times
            {
                foreach (var player in ActivePlayers.ToArray())
                {
                    Card card = Deck.Pop();
                    player.AddCard(card);
                }
            }

            //if >3 players, smallblind posts smallblind else dealerbutton does
            DoAction(BigBlind != null ? SmallBlind : DealerButton, PlayerAction.Bet, Dealer.SmallBlind, true, false);

            //if >3 players, bigblind posts bigblind else smallblind does
            DoAction(BigBlind ?? SmallBlind, PlayerAction.Bet, Dealer.BigBlind, true, false);

            CurrentTurn = BigBlind ?? SmallBlind;

            AssignNextTurn();
        }
Example #2
0
 // Get all the Active Players so we can use it for our mission builder.
 public NetHandle[] GetActivePlayers()
 {
     return(ActivePlayers.ToArray());
 }