Modifier and Type | Method | Description |
---|---|---|
Direction |
getDirection() |
get the direction of the Ghost
|
GhostType |
getGhostType() |
get the type of the ghost
|
int |
getPositionX() |
get the position in X
|
int |
getPositionY() |
get the position in Y
|
boolean |
isFleeing() |
A gost in flee can be eaten pacman
|
void |
move(int dx) |
|
void |
reset() |
|
void |
setDirection(Direction dir) |
|
void |
setFleeing(boolean fleeing) |
public Ghost(int posX, int posY, GhostType t)
public void reset()
public int getPositionX()
Ighost
getPositionX
in interface Ighost
public int getPositionY()
Ighost
getPositionY
in interface Ighost
public Direction getDirection()
Ighost
getDirection
in interface Ighost
public GhostType getGhostType()
Ighost
getGhostType
in interface Ighost
public boolean isFleeing()
Ighost
public void setFleeing(boolean fleeing)
public void move(int dx)
public void setDirection(Direction dir)