Package model
Class PacMann
java.lang.Object
model.Actor
model.PacMann
The yellow protagonist of the game who seeks to eat the dots in the board maze while evading
capture by the ghosts. Subclasses are responsible to PacMann's navigation, whether this is from
user inputs or an AI.
-
Nested Class Summary
Nested classes/interfaces inherited from class model.Actor
Actor.DPair, Actor.Location -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn the current base speed of this actor, before factoring in the weight of the edge they are traversing.Default to the single-edge path that PacMann is currently traversing.voidreset()Set PacMann's current location to the end of his "starting edge" returned by the `pacMannStartingEdge()` method in the `MazeGraph` class.voidAlert the model that PacMann has arrived at a vertex so it can update its state accordingly.Methods inherited from class model.Actor
currentEdge, edgeSpeed, getBoundingBoxUL, location, maxPropagationTime, nearestVertex, nextEdge, propagate, traverseEdge
-
Constructor Details
-
Method Details
-
visitVertex
Alert the model that PacMann has arrived at a vertex so it can update its state accordingly.- Specified by:
visitVertexin classActor
-
reset
public void reset()Set PacMann's current location to the end of his "starting edge" returned by the `pacMannStartingEdge()` method in the `MazeGraph` class. -
guidancePath
Default to the single-edge path that PacMann is currently traversing.- Specified by:
guidancePathin classActor
-
baseSpeed
public double baseSpeed()Description copied from class:ActorReturn the current base speed of this actor, before factoring in the weight of the edge they are traversing.
-