public void Test_Fold() { var seat = new DSeat(); seat.Initialize(); seat.Fold(); Assert.False(seat.Active); }
public void Test_BestHand() { var seat = new DSeat(); seat.Initialize(); SetUpCards(1, seat); seat.FindBestHand(); Assert.True(seat.PlayerHand.HandCards.Count > 0); Assert.Equal(612, seat.HandValue); }
public void Test_SitDown() { var player = new DUser(); var seat = new DSeat(); seat.Initialize(); seat.SitDown(player, 50); Assert.True(seat.ChipTotal == 50); Assert.True(seat.Occupied); Assert.True(seat.Active); }
public void Test_Bid(int bid) { var seat = new DSeat(); seat.Initialize(); seat.ChipTotal = 25; seat.Bid(bid); seat.Bid(bid); Assert.True(seat.ChipTotal >= 0); Assert.False(seat.ChipTotal == 25); }
public void Test_NewRound() { var seat = new DSeat(); seat.Initialize(); seat.Pocket = DrawCards(2); seat.Flop = DrawCards(5); seat.NewRound(); Assert.True(seat.Pocket.Count == 0 && seat.Flop.Count == 0); Assert.True(seat.Active); Assert.True(seat.HandValue == 0 && seat.RoundBid == 0); }
public void Test_AssignHandValue() { var seat = new DSeat(); seat.Initialize(); var hand1 = ReturnHand(1); var hand2 = ReturnHand(2); var hand3 = ReturnHand(3); seat.AssignHandValue(hand1); Assert.Equal(14, seat.PlayerHand.HandValue); seat.AssignHandValue(hand2); Assert.Equal(611, seat.PlayerHand.HandValue); seat.AssignHandValue(hand3); Assert.Equal(900, seat.PlayerHand.HandValue); }
public void Test_StandUp() { var player = new DUser(); player.ChipTotal += 50; var seat = new DSeat(); seat.Initialize(); seat.SitDown(player, 25); seat.StandUp(); Assert.True(seat.ChipTotal == 0); Assert.False(seat.Occupied && seat.Active); Assert.True(player.ChipTotal == 75); }