예제 #1
0
        public void Should_ChangeToOrginalPlayerSizeAfterEscapingSizeIncreaseZone()
        {
            var testGame = new GameModel(100, 100, 0, 1);
            var testForm = new GoalCaptureModeForm(testGame);
            var player   = testGame.Players.First();

            while (testGame.SizeIncreaseZones.Count < 1)
            {
                CreateNewZoneInGoalCaptureMode(testGame, player);
            }
            testGame.CheckSizeIncreaseZones();
            player.SetPosition(player.OriginalPosition);
            testGame.CheckSizeIncreaseZones();

            Assert.AreEqual(player.OriginalWidth, player.Width);
            Assert.AreEqual(player.OriginalHeight, player.Height);
        }
예제 #2
0
        public void Should_IncreasePlayerSizeInSizeIncreaseZone()
        {
            var testGame = new GameModel(100, 100, 0, 1);
            var testForm = new GoalCaptureModeForm(testGame);
            var player   = testGame.Players.First();

            while (testGame.SizeIncreaseZones.Count < 1)
            {
                CreateNewZoneInGoalCaptureMode(testGame, player);
            }
            testGame.CheckSizeIncreaseZones();

            Assert.AreEqual(testGame.SizeIncreaseZones.First().PlayerWidthIncreaseValue, player.Width);
            Assert.AreEqual(testGame.SizeIncreaseZones.First().PlayerHeightIncreaseValue, player.Height);
        }