public void RunToEnd_TwoPlayers_CanDeclareWinner() { OmahaHiLoHand hand = new OmahaHiLoHand(); int numPlayers = 2; OmahaPlayer[] players = new OmahaPlayer[2]; for (int i = 0; i < numPlayers; i++) { var mock = new Mock<OmahaPlayer>(); mock.Setup(p => p.Act()).Returns(PokerAction.CreateCallAction()).Verifiable(); players[i] = mock.Object; hand.Sit(mock.Object, i, 1000); } HandResult result = hand.RunToEnd(); Assert.GreaterOrEqual(result.Winners.Count, 1); }
public HandHistoryPlayer(string name, long bankroll, OmahaPlayer engine) { Name = name; _bankroll = bankroll; _engine = engine; }
public void RunToEnd_ThreeCallPlayers_RunThreeHands() { OmahaHiLoHand hand = new OmahaHiLoHand(); int numPlayers = 3; OmahaPlayer[] players = new OmahaPlayer[numPlayers]; for (int i = 0; i < numPlayers; i++) { var mock = new Mock<OmahaPlayer>(); mock.Setup(p => p.Act()).Returns(PokerAction.CreateCallAction()); players[i] = mock.Object; hand.Sit(mock.Object, i, 1000); } List<HandResult> results = new List<HandResult>(); for (int i = 0; i < 3; i++) { HandResult result = hand.RunToEnd(); Assert.IsFalse(results.Contains(result)); results.Add(result); } }