示例#1
0
文件: Program.cs 项目: djvorr/SSE
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            /*Application.Run(new Board());*/

            Game game = new Game();
            game.main();
        }
示例#2
0
文件: UnitTest2.cs 项目: djvorr/SSE
        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.");
        }