using System;
namespace PocketJack
{
///
/// Summary description for Betting.
///
public class Pot
{
private int betValueChangeValue;
private int betValue;
private int potValue;
private const int INITIAL_POT_VALUE = 500;
private const int INITIAL_BET_CHANGE_VALUE = 5;
public int BetValue
{
get
{
return betValue;
}
}
public int PotValue
{
get
{
return potValue;
}
}
public void ResetPot ()
{
betValueChangeValue = INITIAL_BET_CHANGE_VALUE;
betValue = INITIAL_BET_CHANGE_VALUE;
potValue = INITIAL_POT_VALUE;
}
public void CheckPot ()
{
if (betValue> potValue)
{
if (System.Windows.Forms.MessageBox.Show (
«Insufficient funds for the bet.» +
«Do you want to reload the pot?»,
«Bank»,
System.Windows.Forms.MessageBoxButtons. YesNo,
System.Windows.Forms.MessageBoxIcon. Question,
System.Windows.Forms.
MessageBoxDefaultButton. Button1) ==
System.Windows.Forms. DialogResult. Yes)
{
ResetPot ();
}
else
{
betValue = potValue;
}
}
}
public void DoIncreaseBet ()
{
betValue = betValue + betValueChangeValue;
CheckPot ();
}
public void DoDecreaseBet ()
{
if (betValue> = betValueChangeValue)