Package game.core
Class _RG_
java.lang.Object
game.core.G
game.core._G_
game.core._RG_
- All Implemented Interfaces:
Game
public final class _RG_ extends _G_
This class is to replay games that were recorded using Replay. The only differences are:
1. Ghost reversals are removed
2. Directions are not checked (since they are necessarily valid)
This class should only be used in conjunction with stored directions, not to play the game itself.
-
Nested Class Summary
-
Field Summary
Fields inherited from class game.core.G
config, curGhostLocs, curMaze, curPacManLoc, edibleTimes, extraLife, gameOver, ghostEatMultiplier, lairTimes, lastGhostDirs, lastPacManDir, levelTime, livesRemaining, mazes, pills, powerPills, remainingLevels, rnd, score, totalTime, totLevel
Fields inherited from interface game.core.Game
COMMON_LAIR_TIME, DOWN, EAT_DISTANCE, EDIBLE_TIME, EDIBLE_TIME_REDUCTION, EMPTY, EXTRA_LIFE_SCORE, GHOST_EAT_SCORE, GHOST_REVERSAL, GHOST_SPEED_REDUCTION, INITIAL_GHOST_DIRS, INITIAL_PAC_DIR, LAIR_REDUCTION, LAIR_TIMES, LEFT, LEVEL_LIMIT, MAX_LEVELS, NUM_GHOSTS, NUM_LIVES, NUM_MAZES, PILL, POWER_PILL, RIGHT, UP
-
Constructor Summary
Constructors Constructor Description _RG_()
-
Method Summary
Modifier and Type Method Description int
checkGhostDir(int whichGhost, int direction)
int
checkPacManDir(int direction)
int[]
getGhostNeighbours(int whichGhost)
protected void
updateGhosts(GhostsActions ghosts, boolean reverse)
Methods inherited from class game.core._G_
getHeight, getRecordedMatch, getWidth, monitorGame, newGame
Methods inherited from class game.core.G
advanceGame, advanceGameReplay, checkLevelState, checkPill, checkPowerPill, copy, decimatePills, eatPill, eatPowerPill, feast, gameOver, getCurGhostDir, getCurGhostLoc, getCurLevel, getCurMaze, getCurPacManDir, getCurPacManLoc, getEdibleTime, getEuclideanDistance, getGhostPath, getGhostPathDistance, getGhostTarget, getInitialGhostsPosition, getInitialPacPosition, getJunctionIndices, getLairTime, getLevelTime, getLivesRemaining, getManhattanDistance, getName, getNeighbour, getNextEdibleGhostScore, getNextGhostDir, getNextPacManDir, getNumActivePills, getNumActivePowerPills, getNumberOfNodes, getNumberPills, getNumberPowerPills, getNumNeighbours, getPacManNeighbours, getPath, getPathDistance, getPillIndex, getPillIndices, getPillIndicesActive, getPossibleDirs, getPossibleGhostDirs, getPossiblePacManDirs, getPowerPillIndex, getPowerPillIndices, getPowerPillIndicesActive, getReverse, getScore, getTarget, getTotalTime, getX, getY, ghostRequiresAction, init, isEdible, isJunction, reset, updatePacMan
-
Constructor Details
-
_RG_
public _RG_()
-
-
Method Details
-
updateGhosts
- Overrides:
updateGhosts
in classG
-
getGhostNeighbours
public int[] getGhostNeighbours(int whichGhost)- Specified by:
getGhostNeighbours
in interfaceGame
- Overrides:
getGhostNeighbours
in classG
-
checkGhostDir
public int checkGhostDir(int whichGhost, int direction)- Overrides:
checkGhostDir
in classG
-
checkPacManDir
public int checkPacManDir(int direction)- Overrides:
checkPacManDir
in classG
-