pacman.entries.ghosts.MyGhosts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pacman-main Show documentation
Show all versions of pacman-main Show documentation
The main code for Ms. Pac-Man Vs Ghosts
package pacman.entries.ghosts;
import java.util.EnumMap;
import pacman.controllers.Controller;
import pacman.game.Constants.GHOST;
import pacman.game.Constants.MOVE;
import pacman.game.Game;
/*
* This is the class you need to modify for your entry. In particular, you need to
* fill in the getActions() method. Any additional classes you write should either
* be placed in this package or sub-packages (e.g., game.entries.ghosts.mypackage).
*/
public class MyGhosts extends Controller> {
private EnumMap myMoves = new EnumMap(GHOST.class);
public EnumMap getMove(Game game, long timeDue) {
myMoves.clear();
//Place your game logic here to play the game as the ghosts
return myMoves;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy