static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            IBotEraser currentEraser = new BotEraser();
            IActionManager actionManager = new ActionManager();
            ICombinationDatabase combinationDatabase = new CombinationsDatabase(actionManager);
            Application.Run(new GameTable(actionManager, currentEraser, combinationDatabase));
        }
        public void Test_ActionManagerCheck()
        {
            string playerName = PokerGameConstants.DefaultPlayerName;
            IActionManager manager = new ActionManager();
            IPlayer currentPlayer = new Player(playerName);
            currentPlayer.Status = new Label();
            bool isRisingActivated = true;

            manager.Check(currentPlayer, ref isRisingActivated);

            Assert.IsFalse(isRisingActivated, "Rising is still activated.");
            Assert.IsFalse(currentPlayer.CanPlay, "Player is still allowed to play.");
            Assert.AreEqual("Check", currentPlayer.Status.Text,
                "The player's status text box is not displaying the correct mesage");
        }
        public void Test_ActionManagerCall()
        {
            string playerName = PokerGameConstants.DefaultPlayerName;
            IActionManager manager = new ActionManager();
            IPlayer currentPlayer = new Player(playerName);
            currentPlayer.Status = new Label();
            bool isRisingActivated = true;
            int globalCall = 500;
            TextBox box = new TextBox();
            box.Text = "100000";
            int callResult = PokerGameConstants.DefaultStartingChips - PokerGameConstants.InitialCall;

            manager.Call(currentPlayer, ref isRisingActivated, globalCall, ref box);

            Assert.IsFalse(isRisingActivated, "Rising is still activated.");
            Assert.IsFalse(currentPlayer.CanPlay, "Player is still allowed to play.");
            Assert.AreEqual(callResult, currentPlayer.Chips,
                "Player's chips have not been lowered by the call.");
        }
        public void Test_ActionManagerRaise()
        {
            string playerName = PokerGameConstants.DefaultPlayerName;
            IActionManager manager = new ActionManager();
            IPlayer currentPlayer = new Player(playerName);
            currentPlayer.Status = new Label();
            bool isRisingActivated = false;
            int globalCall = 0;
            int globalRaise = 500;
            TextBox box = new TextBox();
            box.Text = "0";
            int playerChipsResult = currentPlayer.Chips - globalRaise;
            string playerStatusResult = "Raise" + globalRaise;

            manager.Raised(currentPlayer, ref isRisingActivated, ref globalRaise, ref globalCall, ref box);

            Assert.IsTrue(isRisingActivated, "Rising is still activated.");
            Assert.AreEqual(globalCall, globalCall, "The global call and raise are not equal.");
            Assert.AreEqual(playerChipsResult, currentPlayer.Chips, "The player's chips have not been lowered correctly.");
            Assert.IsFalse(currentPlayer.OutOfChips, "The player is out of chips.");
            Assert.IsFalse(currentPlayer.Folded, "The player has folded.");
            Assert.AreEqual(playerStatusResult, currentPlayer.Status.Text, "The player status is not correct.");
            Assert.AreEqual(globalRaise.ToString(), box.Text, "The pot tex box is not displaying correct information.");
        }
        public void Test_ActionManagerHP_GlobalCallZero()
        {
            string playerName = PokerGameConstants.DefaultPlayerName;
            IActionManager manager = new ActionManager();
            IPlayer currentPlayer = new Player(playerName);
            currentPlayer.Status = new Label();
            bool isRisingActivated = true;
            int globalCall = 0;
            int globalRaise = 500;
            TextBox box = new TextBox();
            box.Text = "0";

            manager.HP(currentPlayer, globalCall, box, ref globalRaise, ref isRisingActivated, 1, 2);

            Assert.IsFalse(isRisingActivated, "Rising is still activated.");
            Assert.IsFalse(currentPlayer.CanPlay, "Player is still allowed to play.");
            Assert.AreEqual("Check", currentPlayer.Status.Text,
                "The player's status text box is not displaying the correct mesage");
        }