Package game.core
Interface Game
public interface Game
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Game.DM
-
Field Summary
Fields Modifier and Type Field Description static int
COMMON_LAIR_TIME
static int
DOWN
static int
EAT_DISTANCE
static int
EDIBLE_TIME
static float
EDIBLE_TIME_REDUCTION
static int
EMPTY
static int
EXTRA_LIFE_SCORE
static int
GHOST_EAT_SCORE
static float
GHOST_REVERSAL
static int
GHOST_SPEED_REDUCTION
static int[]
INITIAL_GHOST_DIRS
static int
INITIAL_PAC_DIR
static float
LAIR_REDUCTION
static int[]
LAIR_TIMES
static int
LEFT
static int
LEVEL_LIMIT
static int
MAX_LEVELS
static int
NUM_GHOSTS
static int
NUM_LIVES
static int
NUM_MAZES
static int
PILL
static int
POWER_PILL
static int
RIGHT
static int
UP
-
Method Summary
Modifier and Type Method Description int[]
advanceGame(PacManAction pacMan, GhostsActions ghosts)
boolean
checkPill(int pillIndex)
boolean
checkPowerPill(int powerPillIndex)
Game
copy()
boolean
gameOver()
int
getCurGhostDir(int whichGhost)
int
getCurGhostLoc(int whichGhost)
int
getCurLevel()
int
getCurMaze()
int
getCurPacManDir()
int
getCurPacManLoc()
int
getEdibleTime(int whichGhost)
double
getEuclideanDistance(int from, int to)
int[]
getGhostNeighbours(int whichGhost)
int[]
getGhostPath(int whichGhost, int to)
int
getGhostPathDistance(int whichGhost, int to)
int
getGhostTarget(int from, int[] targets, boolean nearest)
int
getInitialGhostsPosition()
int
getInitialPacPosition()
int[]
getJunctionIndices()
int
getLairTime(int whichGhost)
int
getLevelTime()
int
getLivesRemaining()
int
getManhattanDistance(int from, int to)
java.lang.String
getName()
int
getNeighbour(int nodeIndex, int direction)
int
getNextEdibleGhostScore()
int
getNextGhostDir(int whichGhost, int to, boolean closer, Game.DM measure)
int
getNextPacManDir(int to, boolean closer, Game.DM measure)
int
getNumActivePills()
int
getNumActivePowerPills()
int
getNumberOfNodes()
int
getNumberPills()
int
getNumberPowerPills()
int
getNumNeighbours(int nodeIndex)
int[]
getPacManNeighbours()
int[]
getPath(int from, int to)
int
getPathDistance(int from, int to)
int
getPillIndex(int nodeIndex)
int[]
getPillIndices()
int[]
getPillIndicesActive()
int[]
getPossibleDirs(int curLoc, int curDir, boolean includeReverse)
int[]
getPossibleGhostDirs(int whichGhost)
int[]
getPossiblePacManDirs(boolean includeReverse)
int
getPowerPillIndex(int nodeIndex)
int[]
getPowerPillIndices()
int[]
getPowerPillIndicesActive()
int
getReverse(int direction)
int
getScore()
int
getTarget(int from, int[] targets, boolean nearest, Game.DM measure)
int
getTotalTime()
int
getX(int nodeIndex)
int
getY(int nodeIndex)
boolean
ghostRequiresAction(int whichGhost)
boolean
isEdible(int whichGhost)
boolean
isJunction(int nodeIndex)
-
Field Details
-
UP
static final int UP- See Also:
- Constant Field Values
-
RIGHT
static final int RIGHT- See Also:
- Constant Field Values
-
DOWN
static final int DOWN- See Also:
- Constant Field Values
-
LEFT
static final int LEFT- See Also:
- Constant Field Values
-
EMPTY
static final int EMPTY- See Also:
- Constant Field Values
-
PILL
static final int PILL- See Also:
- Constant Field Values
-
POWER_PILL
static final int POWER_PILL- See Also:
- Constant Field Values
-
GHOST_EAT_SCORE
static final int GHOST_EAT_SCORE- See Also:
- Constant Field Values
-
EDIBLE_TIME
static final int EDIBLE_TIME- See Also:
- Constant Field Values
-
EDIBLE_TIME_REDUCTION
static final float EDIBLE_TIME_REDUCTION- See Also:
- Constant Field Values
-
LAIR_TIMES
static final int[] LAIR_TIMES -
COMMON_LAIR_TIME
static final int COMMON_LAIR_TIME- See Also:
- Constant Field Values
-
LAIR_REDUCTION
static final float LAIR_REDUCTION- See Also:
- Constant Field Values
-
LEVEL_LIMIT
static final int LEVEL_LIMIT- See Also:
- Constant Field Values
-
GHOST_REVERSAL
static final float GHOST_REVERSAL- See Also:
- Constant Field Values
-
MAX_LEVELS
static final int MAX_LEVELS- See Also:
- Constant Field Values
-
EXTRA_LIFE_SCORE
static final int EXTRA_LIFE_SCORE- See Also:
- Constant Field Values
-
EAT_DISTANCE
static final int EAT_DISTANCE- See Also:
- Constant Field Values
-
NUM_GHOSTS
static final int NUM_GHOSTS- See Also:
- Constant Field Values
-
NUM_MAZES
static final int NUM_MAZES- See Also:
- Constant Field Values
-
NUM_LIVES
static final int NUM_LIVES- See Also:
- Constant Field Values
-
INITIAL_PAC_DIR
static final int INITIAL_PAC_DIR- See Also:
- Constant Field Values
-
INITIAL_GHOST_DIRS
static final int[] INITIAL_GHOST_DIRS -
GHOST_SPEED_REDUCTION
static final int GHOST_SPEED_REDUCTION- See Also:
- Constant Field Values
-
-
Method Details
-
copy
Game copy() -
advanceGame
-
getReverse
int getReverse(int direction) -
gameOver
boolean gameOver() -
checkPill
boolean checkPill(int pillIndex) -
checkPowerPill
boolean checkPowerPill(int powerPillIndex) -
getPacManNeighbours
int[] getPacManNeighbours() -
getGhostNeighbours
int[] getGhostNeighbours(int whichGhost) -
getCurLevel
int getCurLevel() -
getCurMaze
int getCurMaze() -
getCurPacManLoc
int getCurPacManLoc() -
getCurPacManDir
int getCurPacManDir() -
getLivesRemaining
int getLivesRemaining() -
getCurGhostLoc
int getCurGhostLoc(int whichGhost) -
getCurGhostDir
int getCurGhostDir(int whichGhost) -
getEdibleTime
int getEdibleTime(int whichGhost) -
isEdible
boolean isEdible(int whichGhost) -
getScore
int getScore() -
getLevelTime
int getLevelTime() -
getTotalTime
int getTotalTime() -
getNumberPills
int getNumberPills() -
getNumberPowerPills
int getNumberPowerPills() -
getLairTime
int getLairTime(int whichGhost) -
ghostRequiresAction
boolean ghostRequiresAction(int whichGhost) -
getName
java.lang.String getName() -
getInitialPacPosition
int getInitialPacPosition() -
getInitialGhostsPosition
int getInitialGhostsPosition() -
getNumberOfNodes
int getNumberOfNodes() -
getX
int getX(int nodeIndex) -
getY
int getY(int nodeIndex) -
getPillIndex
int getPillIndex(int nodeIndex) -
getPowerPillIndex
int getPowerPillIndex(int nodeIndex) -
getNeighbour
int getNeighbour(int nodeIndex, int direction) -
getPillIndices
int[] getPillIndices() -
getPowerPillIndices
int[] getPowerPillIndices() -
getJunctionIndices
int[] getJunctionIndices() -
getNextEdibleGhostScore
int getNextEdibleGhostScore() -
getNumActivePills
int getNumActivePills() -
getNumActivePowerPills
int getNumActivePowerPills() -
getPillIndicesActive
int[] getPillIndicesActive() -
getPowerPillIndicesActive
int[] getPowerPillIndicesActive() -
isJunction
boolean isJunction(int nodeIndex) -
getNumNeighbours
int getNumNeighbours(int nodeIndex) -
getNextPacManDir
-
getNextGhostDir
-
getPathDistance
int getPathDistance(int from, int to) -
getEuclideanDistance
double getEuclideanDistance(int from, int to) -
getManhattanDistance
int getManhattanDistance(int from, int to) -
getPossiblePacManDirs
int[] getPossiblePacManDirs(boolean includeReverse) -
getPossibleGhostDirs
int[] getPossibleGhostDirs(int whichGhost) -
getPossibleDirs
int[] getPossibleDirs(int curLoc, int curDir, boolean includeReverse) -
getPath
int[] getPath(int from, int to) -
getGhostPath
int[] getGhostPath(int whichGhost, int to) -
getTarget
-
getGhostTarget
int getGhostTarget(int from, int[] targets, boolean nearest) -
getGhostPathDistance
int getGhostPathDistance(int whichGhost, int to)
-