pacman.controllers.examples.po.POCommGhosts 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.controllers.examples.po;
import pacman.controllers.IndividualGhostController;
import pacman.controllers.MASController;
import pacman.game.Constants.DM;
import pacman.game.Constants.GHOST;
import pacman.game.Constants.MOVE;
import pacman.game.Game;
import pacman.game.comms.BasicMessage;
import pacman.game.comms.Message;
import pacman.game.comms.Messenger;
import java.util.EnumMap;
import java.util.Random;
/**
* Created by pwillic on 25/02/2016.
*/
public class POCommGhosts extends MASController {
public POCommGhosts() {
this(50);
}
public POCommGhosts(int TICK_THRESHOLD) {
super(true, new EnumMap(GHOST.class));
controllers.put(GHOST.BLINKY, new POCommGhost(GHOST.BLINKY, TICK_THRESHOLD));
controllers.put(GHOST.INKY, new POCommGhost(GHOST.INKY, TICK_THRESHOLD));
controllers.put(GHOST.PINKY, new POCommGhost(GHOST.PINKY, TICK_THRESHOLD));
controllers.put(GHOST.SUE, new POCommGhost(GHOST.SUE, TICK_THRESHOLD));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy