Example #1
0
        private void PlayRound(GameRoundType gameRoundType, int communityCardsCount)
        {
            for (var i = 0; i < communityCardsCount; i++)
            {
                this.communityCards.Add(this.deck.GetNextCard());
            }

            foreach (var player in this.players)
            {
                var startRoundContext = new StartRoundContext(
                    gameRoundType,
                    this.communityCards.AsReadOnly(),
                    player.PlayerMoney.Money,
                    this.bettingLogic.Pot,
                    this.bettingLogic.MainPot,
                    this.bettingLogic.SidePots);
                player.StartRound(startRoundContext);
            }

            this.bettingLogic.Bet(gameRoundType);

            foreach (var player in this.players)
            {
                var endRoundContext = new EndRoundContext(this.bettingLogic.HandBets, gameRoundType);
                player.EndRound(endRoundContext);
            }
        }
Example #2
0
        private void PlayRound(GameRoundType gameRoundType, int communityCardsCount)
        {
            for (var i = 0; i < communityCardsCount; i++)
            {
                this.communityCards.Add(this.deck.GetNextCard());
            }

            foreach (var player in this.players)
            {
                waitPlayer = false;
                var startRoundContext = new StartRoundContext(
                    gameRoundType,
                    this.communityCards,
                    player.PlayerMoney.Money,
                    this.bettingLogic.Pot);
                player.StartRound(startRoundContext);
                player.Connection.SendObject("StartRoundContext", startRoundContext);
                while (!waitPlayer)
                {
                    Thread.Sleep(200);
                }
            }

            this.bettingLogic.Bet(gameRoundType);

            foreach (var player in this.players)
            {
                waitPlayer = false;
                var endRoundContext = new EndRoundContext(this.bettingLogic.RoundBets);
                player.EndRound(endRoundContext);
                player.Connection.SendObject("EndRoundContext", endRoundContext);
                while (!waitPlayer)
                {
                    Thread.Sleep(200);
                }
            }
        }
 public override void EndRound(EndRoundContext context)
 {
     this.roundsActions.Add(context.RoundActions);
     base.EndRound(context);
 }
Example #4
0
 public void EndRound(EndRoundContext context)
 {
     this.state.EndRound(context);
 }
Example #5
0
 public override void EndRound(EndRoundContext context)
 {
     this.state.EndRound(context);
     base.EndRound(context);
 }
 public virtual void EndRound(EndRoundContext context)
 {
     this.Player.EndRound(context);
 }
Example #7
0
 public virtual void EndRound(EndRoundContext context)
 {
 }
 public virtual void EndRound(EndRoundContext context)
 {
     this.Player.EndRound(context);
 }
 public override void EndRound(EndRoundContext context)
 {
     this.state.EndRound(context);
     base.EndRound(context);
 }
 public virtual void EndRound(EndRoundContext context)
 {
 }
 public void EndRound(EndRoundContext context)
 {
     this.state.EndRound(context);
 }