edu.ou.pacman.board
Class BoardLocation

java.lang.Object
  extended by 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

Field Summary
static int NO_BONUS
           
 
Constructor Summary
BoardLocation(Location2D location, BonusType bonusItem, boolean[] blockedDirections, boolean hasPellet, boolean hasUpgrade)
           
 
Method Summary
 boolean blocked(Direction direction)
          Returns whether a location is blocked in the given direction.
 BonusType bonusType()
           
 int collectBonus()
           
 int collectPellet()
           
 int collectUpgrade()
           
 boolean hasBonus()
           
 boolean hasPellet()
           
 boolean hasUpgrade()
           
 Location2D location()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_BONUS

public static final int NO_BONUS
See Also:
Constant Field Values
Constructor Detail

BoardLocation

public BoardLocation(Location2D location,
                     BonusType bonusItem,
                     boolean[] blockedDirections,
                     boolean hasPellet,
                     boolean hasUpgrade)
Method Detail

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()