Ejemplo n.º 1
0
 private void AssertWinners(HandPlayEngine hpEngine)
 {
     var previousStrength = 0;
     foreach (var ph in hpEngine.LastHandResults.Values)
     {
         if (previousStrength == 0)
         {
             previousStrength = (int)ph.Strength;
             continue;
         }
         var currentStrength = (int) ph.Strength;
         Assert.True(currentStrength >= previousStrength);
     }
 }
Ejemplo n.º 2
0
 public void Table_Is_Opened()
 {
     var table = PokerGameUnitTestsHelper.CreateAndOpenTable(9, 9);
     var hpEngine = new HandPlayEngine(table);
     Assert.Equal(1, table.Turn);
     hpEngine.Run();
     Assert.Equal(2, table.Turn);
     Assert.Equal(0, table.ButtonPosition);
     Assert.Equal(1, table.SmallBlindPosition);
     Assert.Equal(2, table.BigBlindPosition);
     AssertWinners(hpEngine);
     hpEngine.Run();
     Assert.Equal(3, table.Turn);
     Assert.Equal(1, table.ButtonPosition);
     Assert.Equal(2, table.SmallBlindPosition);
     Assert.Equal(3, table.BigBlindPosition);
     AssertWinners(hpEngine);
 }