コード例 #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.");
        }