Example #1
0
        public void SetupGame(int Level)
        {
            // Create Game Board
            gameboard.CreateBoardImage(this, Level);

            // Create Board Matrix
            Tuple <int, int> PacmanStartCoordinates = gameboard.InitialiseBoardMatrix(Level);

            // Create Player
            player.CreatePlayerDetails(this);
            player.CreateLives(this);

            // Create Form Elements
            formelements.CreateFormElements(this);

            // Create High Score
            highscore.CreateHighScore(this);

            // Create Food
            food.CreateFoodImages(this);

            // Create Ghosts
            ghost.CreateGhostImage(this);

            // Create Pacman
            pacman.CreatePacmanImage(this, PacmanStartCoordinates.Item1, PacmanStartCoordinates.Item2);
        }
Example #2
0
 public void CreatePacmanTest()
 {
     pacman.CreatePacmanImage(new Form(), 0, 0);
     Assert.NotNull(pacman.PacmanImage.Image);
     Assert.Equal(-3, pacman.PacmanImage.Left);
     Assert.Equal(43, pacman.PacmanImage.Top);
     Assert.Equal("PacmanImage", pacman.PacmanImage.Name);
 }
Example #3
0
 public void CreatePacmanTest()
 {
     // Check default Pacman image has been created
     pacman.CreatePacmanImage(new Form(), 0, 0);
     Assert.AreNotEqual(null, pacman.PacmanImage.Image);
     Assert.AreEqual(-3, pacman.PacmanImage.Left);
     Assert.AreEqual(43, pacman.PacmanImage.Top);
     Assert.AreEqual("PacmanImage", pacman.PacmanImage.Name);
 }