Example #1
0
        public override void StartRound(StartRoundContext context)
        {
            this.UpdateCommonRow(context.CurrentPot);

            ConsoleHelper.WriteOnConsole(this.row + 1, this.width - 11, context.RoundType + "   ");
            base.StartRound(context);
        }
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)
            {
                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 #3
0
        public virtual void StartRound(StartRoundContext context)
        {
            this.HandStrength = OddsCalculator.CalculateHandStrength(context.CommunityCards.ToList(), new List <Card> {
                this.FirstCard, this.SecondCard
            });

            this.CommunityCards = context.CommunityCards;
        }
Example #4
0
        public override void StartRound(StartRoundContext context)
        {
            this.HandStrength = OddsCalculator.CalculateHandStrength(context.CommunityCards.ToList(), new List <Card> {
                this.FirstCard, this.SecondCard
            });

            base.StartRound(context);
        }
Example #5
0
        public override void StartRound(StartRoundContext context)
        {
            this.CurrentRoundBet = 0;
            if (this.InHand)
            {
                this.ShouldPlayInRound = true;
            }

            base.StartRound(context);
        }
Example #6
0
        public override void StartRound(StartRoundContext context)
        {
            base.StartRound(context);

            if (context.RoundType != GameRoundType.PreFlop)
            {
                this.BestHand =
                    this.handEvaluator.GetBestHand(
                        new List <Card>(this.CommunityCards)
                {
                    this.FirstCard, this.SecondCard
                });
            }
        }
Example #7
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);
                }
            }
        }
Example #8
0
 public override void StartRound(StartRoundContext context)
 {
     this.state.StartRound(context);
     base.StartRound(context);
 }
 public virtual void StartRound(StartRoundContext context)
 {
     this.Player.StartRound(context);
 }
 public virtual void StartRound(StartRoundContext context)
 {
     this.Player.StartRound(context);
 }
 public void StartRound(StartRoundContext context)
 {
     this.state.StartRound(context);
 }
        public virtual void StartRound(StartRoundContext context)
        {
            this.HandStrength = OddsCalculator.CalculateHandStrength(context.CommunityCards.ToList(), new List<Card> { this.FirstCard, this.SecondCard });

            this.CommunityCards = context.CommunityCards;
        }
Example #13
0
 public override void StartRound(StartRoundContext context)
 {
     base.StartRound(context);
 }
Example #14
0
 public void StartRound(StartRoundContext context)
 {
     this.state.StartRound(context);
 }
 public override void StartRound(StartRoundContext context)
 {
     this.state.StartRound(context);
     base.StartRound(context);
 }
 public override void StartRound(StartRoundContext context)
 {
     base.StartRound(context);
     this.currentRoundType = context.RoundType;
 }
Example #17
0
 public override void StartRound(StartRoundContext context)
 {
     this.PlayerMoney.NewRound();
     base.StartRound(context);
 }