Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            /*Application.Run(new Board());*/

            Game game = new Game();
            game.main();
        }
Exemplo n.º 2
0
        public void TestGame()
        {
            Game game = new Game();

            game.deal();
            game.seatPlayers();

            Table table = game.getTable();

            Seat s = table.takeTurn();
            Assert.AreEqual(s.GetType(), typeof(Player), "Player not loaded into seat.");
            Assert.IsTrue(s.hand.getCards().Count > 1, "Player cards not loaded.");
            Assert.IsFalse(table.noMoreTurns(), "Detected no more turns.");

            s = table.takeTurn();
            Assert.AreEqual(s.GetType(), typeof(CPU), "CPU not loaded into seat.");
            Assert.IsTrue(s.hand.getCards().Count > 1, "CPU cards not loaded.");
        }