private void btnActions_Click(object sender, EventArgs e) { try { if (sender == btnCheck) { objPokerGame.Check(objPlayerYou); WaitUntilComBet(); } else if (sender == btnBet) { float sngAmt = Convert.ToInt32(Interaction.InputBox("Enter amount you want to bet:", "Type the amount", "", -1, -1)); objPokerGame.Bet(objPlayerYou, sngAmt); WaitUntilComBet(); } else if (sender == btnCall) { objPokerGame.DoCall(objPlayerYou); WaitUntilComBet(); } else { objPokerGame.Fold(objPlayerYou); } } catch (InvalidCastException ex) { MessageBox.Show("Please enter a numeric value."); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ButtonCheck_Click(object sender, EventArgs e) { _game.Check(); MainUpdate(); }
public void TestRoundIncrements() { // Arrange CreatePropperties(); // Round 1 Game.Call(); Game.Check(); // Round 2 Game.Check(); Game.Check(); // Round 3 Game.Check(); Game.Check(); // Round 4 Game.Check(); Game.Check(); // Round 5 Game.Check(); Game.Check(); var expected = 5; // Act var actual = Game.Hands[Game.CurrentHandNumber() - 1].CurrentRoundNumber(); // Assert Assert.AreEqual(expected, actual); }