Пример #1
0
        public void Can_Get_Random_Direction()
        {
            Enemy enemy = new Enemy();
            enemy.DirectionList.Add(Direction.Right);

            var direction = enemy.GetRandomDirection();

            Assert.AreEqual(Direction.Right, direction);
        }
Пример #2
0
        public void Can_Increase_Level()
        {
            GameLevel gameLevel = new GameLevel();
            GameLogic gameLogic = new GameLogic();
            Enemy enemy = new Enemy();

            bool value = gameLevel.IncreaseLevel(gameLogic);

            Assert.AreEqual(value, false);
        }
Пример #3
0
        private Enemy CreateEnemy(Point imageStartingLocation, Point imageCurrentLocation, Color color, Direction currentDirection)
        {
            var enemy = new Enemy()
            {
                ImageStartingLocation = imageStartingLocation,
                ImageCurrentLocation = imageCurrentLocation,
                GhostColor = color,
                CurrentDirection = currentDirection,
            };

            enemy.GenerateEnemy();

            return enemy;
        }