Example #1
0
        public void Can_Remove_Pellets()
        {
            Pellet pellet = new Pellet { };
            pellet.GeneratePellets();

            Point point = new Point(23, 48);

            pellet.RemovePellet(point);

            Assert.AreEqual(pellet.SuperPellets.Count, 3);
        }
Example #2
0
        public void Can_Generate_Pellets()
        {
            Pellet pellet = new Pellet { };

            pellet.GeneratePellets();

            int pelletsSum = 241;
            int superPelletsSum = 4;

            Assert.AreEqual(pellet.Pellets.Count, pelletsSum);
            Assert.AreEqual(pellet.SuperPellets.Count, superPelletsSum);
        }
Example #3
0
        public void InitializeCharacters()
        {
            switch (GameMode)
            {
                case GameModeType.Cheat:
                    Pacman = CreateCheatPacman();
                    break;
                default:
                    Pacman = CreateCommonPacman();
                    break;
            }

            Enemies = new List<Enemy>()
            {
               CreateEnemy(new Point(220, 203), new Point(220, 203), Color.FromArgb(255, 0, 0), Direction.Left),
               CreateEnemy(new Point(205, 203), new Point(205, 203), Color.FromArgb(255, 184, 71), Direction.Right)
            };

            Pellets = new Pellet();
            GameLevel = new GameLevel();
            GenerateCharacters();
        }