Ejemplo n.º 1
0
        public void RoundCountGoalTest()
        {
            ConsoleGameTable gameTable = TestHelper.CreateTestGame(GameMode.RoundCount, 5);

            gameTable.InitializeGame();
            Assert.IsTrue(gameTable.GetGameInstance().IsGameConditionMet());
        }
Ejemplo n.º 2
0
        public void ScoreGoalTest()
        {
            ConsoleGameTable gameTable = TestHelper.CreateTestGame(GameMode.TargetScore, 62);

            gameTable.InitializeGame();
            Assert.IsTrue(gameTable.GetGameInstance().IsGameConditionMet());
        }
Ejemplo n.º 3
0
        public static ConsoleGameTable CreateTestGame(GameMode gameMode, object endingCondition)
        {
            ConsoleGameTable gameTable = new ConsoleGameTable();

            object[] endingConditionParams = new object[2];
            endingConditionParams[0] = gameTable;
            endingConditionParams[1] = endingCondition;
            gameTable.ChangeGameMode(gameMode, endingConditionParams);

            ConsolePlayer player1 = new ConsolePlayer(gameTable);
            ConsolePlayer player2 = new ConsolePlayer(gameTable);
            ConsolePlayer player3 = new ConsolePlayer(gameTable);
            ConsolePlayer player4 = new ConsolePlayer(gameTable);

            gameTable.Sit(player1);
            gameTable.Sit(player2);
            gameTable.Sit(player3);
            gameTable.Sit(player4);

            return(gameTable);
        }