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); } }
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); }
public void EndRound(EndRoundContext context) { this.state.EndRound(context); }
public override void EndRound(EndRoundContext context) { this.state.EndRound(context); base.EndRound(context); }
public virtual void EndRound(EndRoundContext context) { this.Player.EndRound(context); }
public virtual void EndRound(EndRoundContext context) { }