edu.ou.pacman.character
Class PacmanCharacter

java.lang.Object
  extended by edu.ou.pacman.character.PacmanCharacter

public final class PacmanCharacter
extends java.lang.Object

Class used to define a character for the pac-man gameboard.

Author:
Derek Rushing

Constructor Summary
PacmanCharacter(CharacterType characterType, Location2D location)
           
PacmanCharacter(PacmanCharacter c)
           
 
Method Summary
static java.awt.image.BufferedImage characterImage(CharacterType character)
          Get the image for the specified character.
 Direction currentAction()
           
 PacmanRecord getRecord()
           
 java.awt.image.BufferedImage image()
          Get the image for this character.
 Location2D location()
          Current location of the character.
 void move(int xCoordinate, int yCoordinate)
          Change the location of the character.
 void move(Location2D location)
          Change the location of the character.
 void setCurrentAction(Direction d)
           
 CharacterType type()
          The character type for the given character.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacmanCharacter

public PacmanCharacter(CharacterType characterType,
                       Location2D location)

PacmanCharacter

public PacmanCharacter(PacmanCharacter c)
Method Detail

characterImage

public static java.awt.image.BufferedImage characterImage(CharacterType character)
Get the image for the specified character.

Parameters:
character - - The character to get the image for
Returns:
The image representing the character

image

public java.awt.image.BufferedImage image()
Get the image for this character.


location

public Location2D location()
Current location of the character.


move

public void move(int xCoordinate,
                 int yCoordinate)
Change the location of the character.

Parameters:
xCoordinate - - The x coordinate to move to.
yCoordinate - - The y coordinate to move to.

move

public void move(Location2D location)
Change the location of the character.

Parameters:
location - - The new location for the character.

type

public CharacterType type()
The character type for the given character.


currentAction

public Direction currentAction()

setCurrentAction

public void setCurrentAction(Direction d)

getRecord

public PacmanRecord getRecord()