diff --git a/Source/TexasHoldem.Logic/GameMechanics/TwoPlayersHandLogic.cs b/Source/TexasHoldem.Logic/GameMechanics/TwoPlayersHandLogic.cs index cf1744a..a330a9a 100644 --- a/Source/TexasHoldem.Logic/GameMechanics/TwoPlayersHandLogic.cs +++ b/Source/TexasHoldem.Logic/GameMechanics/TwoPlayersHandLogic.cs @@ -71,15 +71,6 @@ public void Play() this.DetermineWinnerAndAddPot(this.bettingLogic.Pot); - // showdown - foreach (var player in this.players) - { - if (player.PlayerMoney.InHand) - { - this.showdownCards.Add(player.Name, player.Cards); - } - } - foreach (var player in this.players) { player.EndHand(new EndHandContext(this.showdownCards)); @@ -95,6 +86,15 @@ private void DetermineWinnerAndAddPot(int pot) } else { + // showdown + foreach (var player in this.players) + { + if (player.PlayerMoney.InHand) + { + this.showdownCards.Add(player.Name, player.Cards); + } + } + var betterHand = Helpers.CompareCards( this.players[0].Cards.Concat(this.communityCards), this.players[1].Cards.Concat(this.communityCards));