Index

A B C D E F G H I J K L M N O P R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

Actor - Class in model
A character in the game, which can store and update its location on the game graph and interact with the game model based on its location.
Actor(GameModel) - Constructor for class model.Actor
Construct a new actor associated with the given `model`.
Actor.DPair - Record Class in model
A record class that represents ordered pairs of doubles
Actor.Location - Record Class in model
 
actors - Variable in class model.GameModel
The actors in this game, PacMann will be in index 0 and the ghosts will be in indices 1-4
actors() - Method in class model.GameModel
Return the actors associated with this game instance
add(KeyType, double) - Method in class graph.MinPQueue
Add element `key` to this queue, associated with priority `priority`.
addOrUpdate(KeyType, double) - Method in class graph.MinPQueue
If `key` is already contained in this queue, change its associated priority to `priority`.
addOutgoingEdge(MazeGraph.MazeEdge) - Method in class model.MazeGraph.MazeVertex
Add `edge` as an outgoing edge from this vertex.
addPropertyChangeListener(PropertyChangeListener) - Method in class ui.InteractiveGameController
Register `listener` to be notified whenever any property of this model is changed.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class model.GameModel
Register `listener` to be notified whenever the property named `propertyName` of this model is changed.
addPropertyChangeListener(String, PropertyChangeListener) - Method in class ui.InteractiveGameController
Register `listener` to be notified whenever the property named `propertyName` of this model is changed.
addToScore(int) - Method in class model.GameModel
Increment the current score by `points` points and notify "score" observers.
atVertex() - Method in record class model.Actor.Location
Return whether this actor's location represents standing atop a vertex (which is true when progress is 0 or 1).

B

baseSpeed() - Method in class model.Actor
Return the current base speed of this actor, before factoring in the weight of the edge they are traversing.
baseSpeed() - Method in class model.Ghost
 
baseSpeed() - Method in class model.PacMann
 
BatchApp - Class in ui
Run a sequence of non-interactive PacMan games and report final scores and other metrics.
BatchApp(GameModel) - Constructor for class ui.BatchApp
 
blinky() - Method in class model.GameModel
Return a reference to this game instance's Blinky Actor object
boardListener - Variable in class ui.GameBoard
Listener to register with model to respond to board state changes.

C

CARNELLIAN - Static variable in class ui.Tile
The color of the maze walls
Cell(int, int) - Constructor for record class util.MazeGenerator.Cell
Creates an instance of a Cell record class.
CellBoundary(MazeGenerator.Orientation, int, int) - Constructor for record class util.MazeGenerator.CellBoundary
Creates an instance of a CellBoundary record class.
CHASE - Enum constant in enum class model.Ghost.GhostState
 
closestTo(int, int) - Method in class model.MazeGraph
Return a vertex that is close to the tile location `(i, j)` (where `i` is column number and `j` is row number).
clyde() - Method in class model.GameModel
Return a reference to this game instance's Clyde Actor object
collidesWith(Actor.Location) - Method in record class model.Actor.Location
Determines whether this location and the given `other` location have collided.
collideWithGhost(Ghost) - Method in class model.GameModel
Handle a PacMann-Ghost collision.
color() - Method in class model.Ghost
Return this ghost's color (for painting)
controller - Variable in class ui.GameBoard
 
controller - Variable in class ui.PlayPauseButton
The interaction controller whose state determines this button's text and enabled status and who will receive commands from this button.
controller() - Method in class ui.GameBoard
 
currentEdge() - Method in class model.Actor
Return the current edge that this actor is traversing.

D

defeat() - Method in class model.GameModel
Handle the end of the round (i.e., when PacMann has been caught).
DEFEAT - Enum constant in enum class model.GameModel.GameState
 
direction - Variable in record class model.MazeGraph.MazeEdge
The field for the direction record component.
direction() - Method in record class model.MazeGraph.MazeEdge
Returns the value of the direction record component.
Direction() - Constructor for enum class model.MazeGraph.Direction
 
distance - Variable in record class graph.Pathfinding.PathEnd
The field for the distance record component.
distance() - Method in record class graph.Pathfinding.PathEnd
Returns the value of the distance record component.
DOT - Enum constant in enum class model.GameModel.Item
 
DOWN - Enum constant in enum class model.MazeGraph.Direction
 
DPair(double, double) - Constructor for record class model.Actor.DPair
Creates an instance of a DPair record class.
dst - Variable in record class model.MazeGraph.MazeEdge
The field for the dst record component.
dst() - Method in interface graph.Edge
Return the vertex that this edge leads to (the "destination" vertex).
dst() - Method in record class model.MazeGraph.MazeEdge
Returns the value of the dst record component.

E

edge - Variable in record class model.Actor.Location
The field for the edge record component.
edge() - Method in record class model.Actor.Location
Returns the value of the edge record component.
Edge<VertexType> - Interface in graph
Represents a weighted, directed edge between two vertices of type `VertexType` in a graph.
edgeInDirection(MazeGraph.Direction) - Method in class model.MazeGraph.MazeVertex
Return the edge leaving this vertex in the direction `direction`, or null if no such edge exists.
edgeMap - Variable in class model.MazeGraph.MazeVertex
This vertex's outgoing edges, each associated with the direction it points in.
edgeSpeed() - Method in class model.Actor
Return the speed of this actor, which is primarily a function of its `currentEdge`'s weight.
edgeWeight(double, double) - Static method in class model.MazeGraph
Return the weight that an edge should have if it connects a vertex with elevation `srcElev` to a vertex with elevation `dstElev`.
elem1 - Variable in class model.GameModel.UnorderedPair
 
elem2 - Variable in class model.GameModel.UnorderedPair
 
elevation - Variable in class ui.Tile
The elevation of this tile.
ElevationGenerator - Class in util
Uses Perlin noise to generate the heights of each tile in the maze grid.
ElevationGenerator() - Constructor for class util.ElevationGenerator
 
elevations - Variable in record class util.GameMap
The field for the elevations record component.
elevations() - Method in record class util.GameMap
Returns the value of the elevations record component.
Entry(KeyType, double) - Constructor for record class graph.MinPQueue.Entry
Creates an instance of a Entry record class.
equals(Object) - Method in record class graph.MinPQueue.Entry
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class graph.Pathfinding.PathEnd
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class model.Actor.DPair
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class model.Actor.Location
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class model.GameModel.Trajectory
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in class model.GameModel.UnorderedPair
 
equals(Object) - Method in record class model.MazeGraph.IPair
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class model.MazeGraph.MazeEdge
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class ui.Tile.TileType
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class util.GameMap
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class util.MazeGenerator.Cell
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class util.MazeGenerator.CellBoundary
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class util.Randomness
Indicates whether some other object is "equal to" this one.

F

fillAssignedTileTypes(MazeGenerator.TileType[][], boolean[][], boolean[][]) - Method in class util.MazeGenerator
Use the horizontal and vertical edge assignments to determine the remaining tile types.
fillKnownTileTypes(MazeGenerator.TileType[][]) - Method in class util.MazeGenerator
Fill in the types of tiles that are not randomly generated.
fixGhostBox(MazeGenerator.TileType[][]) - Method in class util.MazeGenerator
Reassign the types of tiles within the ghost box.
FLEE - Enum constant in enum class model.Ghost.GhostState
 
fleeTimeRemaining - Variable in class model.Ghost
When in the FLEE state, the number of milliseconds remaining before this ghost returns to its CHASE state
fleeTimeRemaining() - Method in class model.Ghost
Return the amount of time remaining on this ghost's FLEE timer
fromActor(Actor) - Static method in record class model.GameModel.Trajectory
 

G

gameBoard - Variable in class ui.GameFrame
The component for displaying the current game state and responding to user input related to game actions.
GameBoard - Class in ui
 
GameBoard(GameModel, boolean) - Constructor for class ui.GameBoard
 
GameFrame - Class in ui
A window that allows playing an interactive game of PacMann.
GameFrame(int, int, boolean, boolean, long) - Constructor for class ui.GameFrame
Create a new window for playing interactive games of PacMann.
GameMap - Record Class in util
Represents a map to be used by a game of PacMann.
GameMap(MazeGenerator.TileType[][], double[][]) - Constructor for record class util.GameMap
Creates an instance of a GameMap record class.
GameModel - Class in model
The underlying state representation of a PacMann game, including the game graph and actors.
GameModel(GameMap, Randomness, boolean) - Constructor for class model.GameModel
Construct a new game model using the given arrays of tile types and elevations
GameModel.GameState - Enum Class in model
During its lifetime, the game transitions from READY -> PLAYING -> either VICTORY/DEFEAT
GameModel.Item - Enum Class in model
Each path tile contains a dot, contains a pellet, or is empty.
GameModel.PacMannCaught - Exception Class in model
Indicates that a collision between PacMann and a CHASING ghost was detected, meaning that the current round should end.
GameModel.Trajectory - Record Class in model
The position and velocity of an actor on an associated _undirected_ edge.
GameModel.UnorderedPair<T> - Class in model
An unordered pair of values of type `T`.
GAMEOVER - Enum constant in enum class ui.InteractiveGameController.GameState
 
GameState() - Constructor for enum class model.GameModel.GameState
 
GameState() - Constructor for enum class ui.InteractiveGameController.GameState
 
generateElevations(int, int, Random) - Static method in class util.ElevationGenerator
Return a 2D double array with given `width` and `height` representing the elevations of each tile, calculated using Perlin noise.
generateMaze() - Method in class util.MazeGenerator
Returns a randomly generated maze, which a 2D array of dimension `3*width+2` by `3*height+2` of either wall or path tiles.
generatorFor(String) - Method in record class util.Randomness
Return a random number generator to be used by a submodel with ID `id`.
getBoundingBoxUL() - Method in class model.Actor
Return the upper left corner of this actor's bounding box.
getBoundingBoxUL() - Method in class model.Ghost
In their WAIT state, the ghosts move from side to side in their box, otherwise, their bounding box location is delegated up to `Actor.getBoundingBoxUL`.
getWallType(MazeGenerator.TileType[][], int, int) - Method in class ui.GameBoard
Return the type of wall tile that should be drawn in a particular location.
Ghost - Class in model
A ghost in the game.
Ghost(GameModel, Color, int) - Constructor for class model.Ghost
Construct a ghost associated to the given `model` with specified color and initial delay
Ghost.GhostState - Enum Class in model
The three possible behavior states of ghosts
GHOSTBOX - Enum constant in enum class util.MazeGenerator.TileType
 
ghostColor - Variable in class model.Ghost
The color of this ghost in its CHASE state
ghostColor(Ghost) - Method in class ui.GameBoard
 
ghostStartingEdge() - Method in class model.MazeGraph
Return the first edge that a ghost will traverse upon transitioning from the WAIT to the CHASE state.
GhostState() - Constructor for enum class model.Ghost.GhostState
 
graph - package graph
 
graph - Variable in class model.GameModel
The graph representation of the game's maze
graph() - Method in class model.GameModel
Return a reference to this game's graph
GraphicalApp - Class in ui
Runs the PacMann game in its GUI mode.
GraphicalApp() - Constructor for class ui.GraphicalApp
 
guidancePath - Variable in class model.Ghost
The edges comprising the most recently calculated path to this ghosts' `target()`
guidancePath() - Method in class model.Actor
Return the list of Edges in this actor's current planned path through the maze (if any).
guidancePath() - Method in class model.Ghost
 
guidancePath() - Method in class model.PacMann
Default to the single-edge path that PacMann is currently traversing.

H

hashCode() - Method in record class graph.MinPQueue.Entry
Returns a hash code value for this object.
hashCode() - Method in record class graph.Pathfinding.PathEnd
Returns a hash code value for this object.
hashCode() - Method in record class model.Actor.DPair
Returns a hash code value for this object.
hashCode() - Method in record class model.Actor.Location
Returns a hash code value for this object.
hashCode() - Method in record class model.GameModel.Trajectory
Returns a hash code value for this object.
hashCode() - Method in class model.GameModel.UnorderedPair
 
hashCode() - Method in record class model.MazeGraph.IPair
Returns a hash code value for this object.
hashCode() - Method in record class model.MazeGraph.MazeEdge
Returns a hash code value for this object.
hashCode() - Method in record class ui.Tile.TileType
Returns a hash code value for this object.
hashCode() - Method in record class util.GameMap
Returns a hash code value for this object.
hashCode() - Method in record class util.MazeGenerator.Cell
Returns a hash code value for this object.
hashCode() - Method in record class util.MazeGenerator.CellBoundary
Returns a hash code value for this object.
hashCode() - Method in record class util.Randomness
Returns a hash code value for this object.
heap - Variable in class graph.MinPQueue
ArrayList representing a binary min-heap of element-priority pairs.
height - Variable in class model.GameModel
The number of cells tall the maze is
height - Variable in class model.MazeGraph
The height of the tile grid defining this maze.
height - Variable in class ui.GameFrame
The number of rows in maps played in this window.
height - Variable in class util.MazeGenerator
The height of the mazes (i.e., number of path rows) produced by this generator.
height() - Method in class model.GameModel
Return the height of the maze in this game instance
HORIZONTAL - Enum constant in enum class util.MazeGenerator.Orientation
 

I

i - Variable in record class model.Actor.DPair
The field for the i record component.
i - Variable in record class model.MazeGraph.IPair
The field for the i record component.
i - Variable in class ui.Tile
The horizontal position of this tile.
i() - Method in record class model.Actor.DPair
Returns the value of the i record component.
i() - Method in record class model.MazeGraph.IPair
Returns the value of the i record component.
index - Variable in class graph.MinPQueue
Associates each element in the queue with its index in `heap`.
initialDelay - Variable in class model.Ghost
The total number of milliseconds before this ghost enters the maze in its CHASE state
initializeCellComponents(int, int) - Method in class util.MazeGenerator
Return a hashmap associating each cell with its connected component.
initializeEdges(boolean[][], boolean[][]) - Method in class util.MazeGenerator
Initialize the edges that must be present/absent in the graph.
inky() - Method in class model.GameModel
Return a reference to this game instance's Inky Actor object
InteractiveGameController - Class in ui
 
InteractiveGameController(GameModel) - Constructor for class ui.InteractiveGameController
 
InteractiveGameController.GameState - Enum Class in ui
 
IPair(int, int) - Constructor for record class model.MazeGraph.IPair
Creates an instance of a IPair record class.
isEmpty() - Method in class graph.MinPQueue
Return whether this queue contains no elements.
Item() - Constructor for enum class model.GameModel.Item
 
itemAt(MazeGraph.MazeVertex) - Method in class model.GameModel
Return the item located at the given Vertex `v`, possibly NONE.
items - Variable in class model.GameModel
A map from the vertices in the game graph to items positioned on these vertices.

J

j - Variable in record class model.Actor.DPair
The field for the j record component.
j - Variable in record class model.MazeGraph.IPair
The field for the j record component.
j - Variable in class ui.Tile
The vertical position of this tile.
j() - Method in record class model.Actor.DPair
Returns the value of the j record component.
j() - Method in record class model.MazeGraph.IPair
Returns the value of the j record component.

K

key - Variable in record class graph.MinPQueue.Entry
The field for the key record component.
key() - Method in record class graph.MinPQueue.Entry
Returns the value of the key record component.
keyPressed(KeyEvent) - Method in class ui.InteractiveGameController
 
keyReleased(KeyEvent) - Method in class ui.InteractiveGameController
 
keyTyped(KeyEvent) - Method in class ui.InteractiveGameController
 

L

lastEdge - Variable in record class graph.Pathfinding.PathEnd
The field for the lastEdge record component.
lastEdge() - Method in record class graph.Pathfinding.PathEnd
Returns the value of the lastEdge record component.
LEFT - Enum constant in enum class model.MazeGraph.Direction
 
LIFESTART - Enum constant in enum class ui.InteractiveGameController.GameState
 
loc - Variable in class model.MazeGraph.MazeVertex
The location of this vertex's tile within the tile grid.
loc() - Method in class model.MazeGraph.MazeVertex
Return the coordinates of this vertex's tile in the tile grid.
location - Variable in class model.Actor
The current location of this actor, modeled as a record of the edge that they are currently traversing and their relative progress along this edge.
location() - Method in class model.Actor
Return Location object summarizing this actor's current location.
Location(MazeGraph.MazeEdge, double) - Constructor for record class model.Actor.Location
Creates an instance of a Location record class.

M

main(String[]) - Static method in class ui.BatchApp
 
main(String[]) - Static method in class ui.GraphicalApp
Process the program arguments and construct/show the GameFrame on the event dispatch thread.
map - Variable in class model.GameModel
The map associated with this model
map() - Method in class model.GameModel
Return the GameMap that was used to construct this model
maxPropagationTime() - Method in class model.Actor
Return the amount of game time (in ms) that this actor is able to travel at its current speed before reaching a vertex or changing state.
maxPropagationTime() - Method in class model.Ghost
 
MazeEdge(MazeGraph.MazeVertex, MazeGraph.MazeVertex, MazeGraph.Direction, double) - Constructor for record class model.MazeGraph.MazeEdge
Creates an instance of a MazeEdge record class.
MazeGenerator - Class in util
Used to generate a "Pac-Man style" maze on which the game is played.
MazeGenerator(int, int, Random) - Constructor for class util.MazeGenerator
Construct a maze generator that produces mazes of size `3*width+2 x 3*height+2`.
MazeGenerator.Cell - Record Class in util
Connected components of Cells model wall segments in our generator algorithm.
MazeGenerator.CellBoundary - Record Class in util
Edges represent the boundaries of cells.
MazeGenerator.Orientation - Enum Class in util
The direction of this edge.
MazeGenerator.TileType - Enum Class in util
Each tile (i.e.
MazeGraph - Class in model
A graph representing a game's maze, connecting the "path" tiles of a tile grid.
MazeGraph(GameMap) - Constructor for class model.MazeGraph
Construct the maze graph corresponding to the tile grid `map`.
MazeGraph.Direction - Enum Class in model
The direction of a (directed) edge in this graph.
MazeGraph.IPair - Record Class in model
An ordered pair of integers.
MazeGraph.MazeEdge - Record Class in model
Represents a directed edge from `src` to `dst` with weight `weight`, which points in direction `direction` on the tile grid.
MazeGraph.MazeVertex - Class in model
A vertex in our graph, corresponding to a path tile in the tile grid.
MazeVertex(MazeGraph.IPair) - Constructor for class model.MazeGraph.MazeVertex
Construct a new vertex at location `loc` with no outgoing edges.
MinPQueue<KeyType> - Class in graph
A min priority queue of distinct elements of type `KeyType` associated with (extrinsic) double priorities, implemented using a binary heap paired with a hash table.
MinPQueue() - Constructor for class graph.MinPQueue
Create an empty queue.
MinPQueue.Entry<KeyType> - Record Class in graph
Pairs an element `key` with its associated priority `priority`.
minPriority() - Method in class graph.MinPQueue
Return the minimum priority associated with an element in this queue.
model - package model
 
model - Variable in class model.Actor
The game model with which this actor is associated.
model - Variable in class ui.BatchApp
 
model - Variable in class ui.GameBoard
 
model - Variable in class ui.GameFrame
The state and logic of the current game being played in this window.
model - Variable in class ui.InteractiveGameController
 
model - Variable in class ui.ScoreLabel
The model whose score and lives remaining we should display.
model() - Method in class ui.BatchApp
 

N

navAndGuide() - Method in class model.GameModel
Give any actor currently standing on a vertex an opportunity to decide which edge to traverse next.
nearestVertex() - Method in record class model.Actor.Location
Return the nearest vertex to this actor, depending on their progress along the current edge.
nearestVertex() - Method in class model.Actor
Return the closest vertex to this actor's current position, which will be either `currentEdge.src()` or `currentEdge.dst()`, depending on `distanceAlongEdge`.
newGame() - Method in class ui.GameFrame
Replace the current game with a new game corresponding to the next source of randomness.
newGame(int, int, boolean, Randomness) - Static method in class model.GameModel
Static method to construct a GameModel object associated with a new random maze
next() - Method in record class util.Randomness
Return a new source of randomness that is next (after this one) in a deterministic sequence of randomness sources.
nextCollisionTime() - Method in class model.GameModel
Return the earliest timestep at which two actors will collide, given their current trajectories.
nextDt(double) - Method in class model.GameModel
Return the largest timestep that the engine can propagate the actors by, up to `maxDt`.
nextEdge() - Method in class model.Actor
Returns the next edge that this actor will traverse in the game graph.
nextEdge() - Method in class model.Ghost
Returns the first edge along the shortest path from this ghost's `currentVertex()` to its `target()`.
nextFrame() - Method in class ui.InteractiveGameController
 
NONE - Enum constant in enum class model.GameModel.Item
 
numGhostsCaught - Variable in class model.GameModel
The number of ghosts that were caught during the current FLEE cycle
numLives - Variable in class model.GameModel
The number of lives remaining
numLives() - Method in class model.GameModel
Return the number of remaining lives

O

orientation - Variable in record class util.MazeGenerator.CellBoundary
The field for the orientation record component.
orientation() - Method in record class util.MazeGenerator.CellBoundary
Returns the value of the orientation record component.
Orientation() - Constructor for enum class util.MazeGenerator.Orientation
 
outgoingEdges() - Method in interface graph.Vertex
Return an object supporting iteration over all the edges connecting this vertex to another vertex in the graph.
outgoingEdges() - Method in class model.MazeGraph.MazeVertex
 

P

p - Variable in record class model.GameModel.Trajectory
The field for the p record component.
p() - Method in record class model.GameModel.Trajectory
Returns the value of the p record component.
pacMann() - Method in class model.GameModel
Return a reference to this game instance's PacMann Actor object
PacMann - Class in model
The yellow protagonist of the game who seeks to eat the dots in the board maze while evading capture by the ghosts.
PacMann(GameModel) - Constructor for class model.PacMann
Construct a PacMann character associated to the given `model`.
PacMannCaught() - Constructor for exception class model.GameModel.PacMannCaught
 
pacMannStartingEdge() - Method in class model.MazeGraph
Return the first edge that PacMann will traverse at the start of a game.
paint(Graphics2D) - Method in class ui.Tile
Draw this tile using the Graphics object `g` at the scaling specified by `tileDim`.
paintComponent(Graphics) - Method in class ui.GameBoard
 
paintGhost(Ghost, Graphics2D) - Method in class ui.GameBoard
 
paintPacMann(PacMann, Graphics2D) - Method in class ui.GameBoard
 
paintPath(Graphics2D, List<MazeGraph.MazeEdge>) - Method in class ui.GameBoard
 
paintVertex(MazeGraph.MazeVertex, Graphics2D) - Method in class ui.GameBoard
 
PATH - Enum constant in enum class util.MazeGenerator.TileType
 
PathEnd(double, E) - Constructor for record class graph.Pathfinding.PathEnd
Creates an instance of a PathEnd record class.
Pathfinding - Class in graph
 
Pathfinding() - Constructor for class graph.Pathfinding
 
Pathfinding.PathEnd<E> - Record Class in graph
Represents a path ending at `lastEdge.end()` along with its total weight (distance).
pathInfo(V, E) - Static method in class graph.Pathfinding
Returns a map that associates each vertex reachable from `src` along a non-backtracking path with a `PathEnd` object.
pathTo(Map<V, Pathfinding.PathEnd<E>>, V, V) - Static method in class graph.Pathfinding
Return the list of edges in the shortest non-backtracking path from `src` to `dst`, as summarized by the given `pathInfo` map.
pause() - Method in class ui.InteractiveGameController
 
PAUSED - Enum constant in enum class ui.InteractiveGameController.GameState
 
peek() - Method in class graph.MinPQueue
Return an element associated with the smallest priority in this queue.
PELLET - Enum constant in enum class model.GameModel.Item
 
pinky() - Method in class model.GameModel
Return a reference to this game instance's Pinky Actor object
placeDotsAndPellets() - Method in class model.GameModel
Adds all dots and pellets to `items` during the construction of this game.
play() - Method in class ui.BatchApp
 
PLAYING - Enum constant in enum class model.GameModel.GameState
 
PlayPauseButton - Class in ui
A button that facilitates starting and pausing an interactive game of PacMann.
PlayPauseButton(InteractiveGameController) - Constructor for class ui.PlayPauseButton
Create a new button providing an interface to `controller`.
PREFERRED_TILE_SIZE - Static variable in class ui.GameBoard
Tile size (width and height) used to compute the preferred display size of a game board [pixels].
priority - Variable in record class graph.MinPQueue.Entry
The field for the priority record component.
priority() - Method in record class graph.MinPQueue.Entry
Returns the value of the priority record component.
processCollision(Actor, Actor) - Method in class model.GameModel
Handle a collision detected between two actors.
processPacMannArrival() - Method in class model.GameModel
Update the model to reflect PacMann's arrival at a vertex.
processStartPause() - Method in class ui.InteractiveGameController
Processes a press of the start/pause button.
progress - Variable in record class model.Actor.Location
The field for the progress record component.
progress() - Method in record class model.Actor.Location
Returns the value of the progress record component.
progressed(double) - Method in record class model.Actor.Location
Return a new Location object reflecting the given amount of progress being made along the current edge.
propagate(double) - Method in class model.Actor
Update this actor's location and state by propagating its current motion along its edge by `dt` ms of game time.
propagate(double) - Method in class model.Ghost
Calculate the new position for this actor after `ms` milliseconds of game time have elapsed.
propertyChange(PropertyChangeEvent) - Method in class ui.GameFrame
 
propertyChange(PropertyChangeEvent) - Method in class ui.PlayPauseButton
 
propertyChange(PropertyChangeEvent) - Method in class ui.ScoreLabel
 
propSupport - Variable in class model.GameModel
Helper object for managing property change notifications.
propSupport - Variable in class ui.InteractiveGameController
Helper object for managing property change notifications.

R

randomlyAssignEdges(boolean[][], boolean[][], List<MazeGenerator.CellBoundary>, HashMap<MazeGenerator.Cell, HashSet<MazeGenerator.Cell>>) - Method in class util.MazeGenerator
Iterate over the assignable edges in a random order to determine whether to include them.
randomness - Variable in class ui.GameFrame
The source of reproducible randomness to use when creating new games via this window.
Randomness - Record Class in util
Provides random number generator seeds to support reproducible randomness that is robust to different compositions of submodels with unique string identifiers.
Randomness(long) - Constructor for record class util.Randomness
Creates an instance of a Randomness record class.
randomnessFor(String) - Method in record class util.Randomness
Return a new source of randomness to be used by a submodel with ID `id`.
randomUnitVector(Random) - Static method in class util.ElevationGenerator
Return a random 2D unit vector
READY - Enum constant in enum class model.GameModel.GameState
 
reflectState(InteractiveGameController.GameState) - Method in class ui.PlayPauseButton
Update our text and enabled status to reflect the action that we will perform when the current interaction state is `state`.
remove() - Method in class graph.MinPQueue
Remove and return the element associated with the smallest priority in this queue.
removePropertyChangeListener(PropertyChangeListener) - Method in class ui.InteractiveGameController
Stop notifying `listener` of property changes for this model (assuming it was added no more than once).
removePropertyChangeListener(String, PropertyChangeListener) - Method in class model.GameModel
Stop notifying `listener` of changes to the property named `propertyName` for this model (assuming it was added no more than once).
removePropertyChangeListener(String, PropertyChangeListener) - Method in class ui.InteractiveGameController
Stop notifying `listener` of changes to the property named `propertyName` for this model (assuming it was added no more than once).
reset() - Method in class model.Actor
Resets this actor to its state at the start of a life.
reset() - Method in class model.Ghost
Transition this ghost to its WAIT state and reset the `waitTimeRemaining` to this ghost's `INITIAL_DELAY`
reset() - Method in class model.PacMann
Set PacMann's current location to the end of his "starting edge" returned by the `pacMannStartingEdge()` method in the `MazeGraph` class.
reset() - Method in class ui.InteractiveGameController
 
resetActors() - Method in class model.GameModel
Resets all ghosts to their WAIT state and PacMann to his starting position, then transitions to the READY state.
respawn() - Method in class model.Ghost
Transition this ghost to its WAIT state when it is caught in its FLEE state, and resets `waitTimeRemaining`.
reverse() - Method in enum class model.MazeGraph.Direction
Return the direction that is the opposite of this direction.
reverse() - Method in record class model.MazeGraph.MazeEdge
Return the edge pointing from `dst` to `src` in the maze graph.
reversed() - Method in record class model.Actor.Location
Return a new Location object reflecting the actor having turned around at the same position on the board.
RIGHT - Enum constant in enum class model.MazeGraph.Direction
 
rng - Variable in class util.MazeGenerator
 
rotation - Variable in record class ui.Tile.TileType
The field for the rotation record component.
rotation() - Method in record class ui.Tile.TileType
Returns the value of the rotation record component.
RUNNING - Enum constant in enum class ui.InteractiveGameController.GameState
 

S

score - Variable in class model.GameModel
The current score
score() - Method in class model.GameModel
Return the current score
scoreLabel - Variable in class ui.GameFrame
The label for showing the score and lives remaining of the current game being played in this window.
ScoreLabel - Class in ui
A label that displays the current score and number of lives remaining in a game of PacMann.
ScoreLabel(GameModel) - Constructor for class ui.ScoreLabel
Create a new label that will display the state of `model` (may be null).
seed - Variable in record class util.Randomness
The field for the seed record component.
seed() - Method in record class util.Randomness
Returns the value of the seed record component.
seedFor(String) - Method in record class util.Randomness
Return an RNG seed to be used by a submodel with ID `id`.
setController(InteractiveGameController) - Method in class ui.PlayPauseButton
Connect this button to `newController` instead of any previous interaction controller.
setGameModel(GameModel) - Method in class ui.GameFrame
Update all UI widgets to reflect the new game model `newModel` instead of any previous game.
setModel(GameModel) - Method in class ui.BatchApp
 
setModel(GameModel) - Method in class ui.GameBoard
 
setModel(GameModel) - Method in class ui.InteractiveGameController
 
setModel(GameModel) - Method in class ui.ScoreLabel
Start displaying the state of `newModel`, instead of any model we may have been displaying before.
setState(GameModel.GameState) - Method in class model.GameModel
Transition to `newState` and notify observers.
setState(InteractiveGameController.GameState) - Method in class ui.InteractiveGameController
 
shape - Variable in record class ui.Tile.TileType
The field for the shape record component.
shape() - Method in record class ui.Tile.TileType
Returns the value of the shape record component.
shortestNonBacktrackingPath(V, V, E) - Static method in class graph.Pathfinding
Returns a list of `E` edges comprising the shortest non-backtracking path from vertex `src` to vertex `dst`.
showLoseMessage() - Method in class ui.GameFrame
Show a modal dialog indicating that the current game has been lost.
showModelState() - Method in class ui.ScoreLabel
Update our text to display the score and lives remaining in our current model.
showPaths - Variable in class ui.GameBoard
Whether to render actors' "guidance paths" for debugging purposes.
showWinMessage() - Method in class ui.GameFrame
Show a modal dialog indicating that the current game has been won.
shuffle(List<T>, Random) - Static method in class util.MazeGenerator
Shuffle the contents of `list` in place.
size() - Method in class graph.MinPQueue
Return the number of elements contained in this queue.
src - Variable in record class model.MazeGraph.MazeEdge
The field for the src record component.
src() - Method in interface graph.Edge
Return the vertex that this edge leaves from (the "source" vertex).
src() - Method in record class model.MazeGraph.MazeEdge
Returns the value of the src record component.
startFlee() - Method in class model.GameModel
Initiate the FLEE sequence by resetting the number of caught ghosts and transitioning all non-WAITING ghosts to their FLEE state.
startFlee() - Method in class model.Ghost
Transition this ghost to its FLEE state and reset the `fleeTimeRemaining`.
state - Variable in class model.GameModel
The current state of this model
state - Variable in class model.Ghost
The current behavioral state of this ghost
state - Variable in class ui.InteractiveGameController
 
state() - Method in class model.GameModel
Return the current state of this game.
state() - Method in class model.Ghost
Return the current state of this ghost
state() - Method in class ui.InteractiveGameController
 
stopGame() - Method in class ui.InteractiveGameController
 
swap(int, int) - Method in class graph.MinPQueue
Swap the Entries at indices `i` and `j` in `heap`, updating `index` accordingly.

T

target() - Method in class model.Ghost
Return the vertex that this ghost is targeting
Tile - Class in ui
Represents one square unit of the maze grid.
Tile(Tile.TileType, int, int, double) - Constructor for class ui.Tile
Construct a new Tile at the given location `(i,j)` with the given `type` and `elevation`.
Tile.TileType - Record Class in ui
The type of wall tile, specified by its shape (0=non-wall, 2=wall cap, 3=wall flat, 4=wall joint) and rotation.
tileGrid - Variable in class ui.GameBoard
2D array of Tile objects that comprise the game's background
TileType() - Constructor for enum class util.MazeGenerator.TileType
 
TileType(int, double) - Constructor for record class ui.Tile.TileType
Creates an instance of a TileType record class.
time - Variable in class model.GameModel
The amount of time that has elapsed
time() - Method in class model.GameModel
Return the amount of elapsed time
timer - Variable in class ui.InteractiveGameController
 
toString() - Method in record class graph.MinPQueue.Entry
Returns a string representation of this record class.
toString() - Method in record class graph.Pathfinding.PathEnd
Returns a string representation of this record class.
toString() - Method in record class model.Actor.DPair
Returns a string representation of this record class.
toString() - Method in record class model.Actor.Location
Returns a string representation of this record class.
toString() - Method in record class model.GameModel.Trajectory
Returns a string representation of this record class.
toString() - Method in class model.GameModel.UnorderedPair
 
toString() - Method in record class model.MazeGraph.IPair
Returns a string representation of this record class.
toString() - Method in record class model.MazeGraph.MazeEdge
Returns a string representation of this record class.
toString() - Method in record class ui.Tile.TileType
Returns a string representation of this record class.
toString() - Method in record class util.GameMap
Returns a string representation of this record class.
toString() - Method in record class util.MazeGenerator.Cell
Returns a string representation of this record class.
toString() - Method in record class util.MazeGenerator.CellBoundary
Returns a string representation of this record class.
toString() - Method in record class util.Randomness
Returns a string representation of this record class.
Trajectory(double, double) - Constructor for record class model.GameModel.Trajectory
Creates an instance of a Trajectory record class.
traverseEdge(MazeGraph.MazeEdge) - Method in class model.Actor
Set this actor's location to the start of `newEdge`.
type - Variable in class ui.Tile
The type of this tile.
types - Variable in record class util.GameMap
The field for the types record component.
types() - Method in record class util.GameMap
Returns the value of the types record component.

U

ui - package ui
 
UnorderedPair(T, T) - Constructor for class model.GameModel.UnorderedPair
 
UP - Enum constant in enum class model.MazeGraph.Direction
 
update(KeyType, double) - Method in class graph.MinPQueue
Change the priority associated with element `key` to `priority`.
updateActors(double) - Method in class model.GameModel
Propagate the game forward in time by `totalDt` ms.
useLife() - Method in class model.GameModel
Decrease the number of remaining lives by one, notifying "lives" observers.
util - package util
 

V

v - Variable in record class model.GameModel.Trajectory
The field for the v record component.
v() - Method in record class model.GameModel.Trajectory
Returns the value of the v record component.
valueOf(String) - Static method in enum class model.GameModel.GameState
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class model.GameModel.Item
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class model.Ghost.GhostState
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class model.MazeGraph.Direction
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class ui.InteractiveGameController.GameState
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class util.MazeGenerator.Orientation
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class util.MazeGenerator.TileType
Returns the enum constant of this class with the specified name.
values() - Static method in enum class model.GameModel.GameState
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class model.GameModel.Item
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class model.Ghost.GhostState
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class model.MazeGraph.Direction
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class ui.InteractiveGameController.GameState
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class util.MazeGenerator.Orientation
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class util.MazeGenerator.TileType
Returns an array containing the constants of this enum class, in the order they are declared.
Vertex<EdgeType> - Interface in graph
Represents a vertex in a graph whose edges have type `EdgeType`.
VERTICAL - Enum constant in enum class util.MazeGenerator.Orientation
 
vertices - Variable in class model.MazeGraph
The vertices of this graph, each associated with the location of its corresponding path tile in the tile grid.
vertices() - Method in class model.MazeGraph
Return the full collection of vertices in this graph.
victory() - Method in class model.GameModel
Handle a victorious end of the game (i.e., when PacMann has eaten all of the dots and pellets).
VICTORY - Enum constant in enum class model.GameModel.GameState
 
visitVertex(MazeGraph.MazeVertex) - Method in class model.Actor
Update the model based on this actor's arrival at vertex v.
visitVertex(MazeGraph.MazeVertex) - Method in class model.Ghost
Ghosts do not take any actions when visiting vertices
visitVertex(MazeGraph.MazeVertex) - Method in class model.PacMann
Alert the model that PacMann has arrived at a vertex so it can update its state accordingly.

W

WAIT - Enum constant in enum class model.Ghost.GhostState
 
waitTimeRemaining - Variable in class model.Ghost
When in the FLEE state, the number of milliseconds remaining before this ghost returns to its CHASE state
waitTimeRemaining() - Method in class model.Ghost
Return the amount of time remaining on this ghost's WAIT timer
WALL - Enum constant in enum class util.MazeGenerator.TileType
 
weight - Variable in record class model.MazeGraph.MazeEdge
The field for the weight record component.
weight() - Method in interface graph.Edge
Return the weight of this edge.
weight() - Method in record class model.MazeGraph.MazeEdge
Returns the value of the weight record component.
width - Variable in class model.GameModel
The number of cells across the maze is
width - Variable in class model.MazeGraph
The width of the tile grid defining this maze.
width - Variable in class ui.GameFrame
The number of columns in maps played in this window.
width - Variable in class util.MazeGenerator
The width of the mazes (i.e., number of path columns) produced by this generator.
width() - Method in class model.GameModel
Return the width of the maze in this game instance
withAI - Variable in class ui.GameFrame
Whether the player actor should be controlled by user input or by an AI in games played in this window.

X

x - Variable in record class util.MazeGenerator.Cell
The field for the x record component.
x - Variable in record class util.MazeGenerator.CellBoundary
The field for the x record component.
x() - Method in record class util.MazeGenerator.Cell
Returns the value of the x record component.
x() - Method in record class util.MazeGenerator.CellBoundary
Returns the value of the x record component.

Y

y - Variable in record class util.MazeGenerator.Cell
The field for the y record component.
y - Variable in record class util.MazeGenerator.CellBoundary
The field for the y record component.
y() - Method in record class util.MazeGenerator.Cell
Returns the value of the y record component.
y() - Method in record class util.MazeGenerator.CellBoundary
Returns the value of the y record component.
A B C D E F G H I J K L M N O P R S T U V W X Y 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form