edu.ou.pacman.board
Class BoardLocation
java.lang.Object
edu.ou.pacman.board.BoardLocation
public class BoardLocation
- extends java.lang.Object
Object used to describe on object on the game board.
- Author:
- Derek Rushing
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_BONUS
public static final int NO_BONUS
- See Also:
- Constant Field Values
BoardLocation
public BoardLocation(Location2D location,
BonusType bonusItem,
boolean[] blockedDirections,
boolean hasPellet,
boolean hasUpgrade)
bonusType
public BonusType bonusType()
blocked
public boolean blocked(Direction direction)
- Returns whether a location is blocked in the given direction.
- Parameters:
direction
- - The direction to check
- Returns:
- Whether the direction is blocked.
collectBonus
public int collectBonus()
collectPellet
public int collectPellet()
collectUpgrade
public int collectUpgrade()
hasBonus
public boolean hasBonus()
hasPellet
public boolean hasPellet()
hasUpgrade
public boolean hasUpgrade()
location
public Location2D location()