|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAIILE.gridworld.util.move.BaseMove
A base class of the Move interface. This is currently used by the GridWorld. The fringe methods are not used.
Constructor Summary | |
BaseMove(Node n)
Creates a new instance of BaseMove |
|
BaseMove(Node n,
java.lang.String d)
|
Method Summary | |
Node |
getCurrentNode()
This returns the current node that moved |
java.lang.String |
getMoveDirection()
This will return the direction set by setMoveDirection or by the constructor. |
java.lang.String |
getShotDirection()
This returns the node that the arrow was shot to. |
boolean |
isArrowShot()
Provides a value of true if the arrow has been shot, false if not. |
boolean |
isGoldPickedUp()
This returns true if the gold has been picked up. |
void |
pickUpGold()
This is similar to the shootArrow method. |
void |
setCurrentNode(Node n)
This sets the current node that moved |
void |
setMoveDirection(java.lang.String m)
This allows the agent to set the direction that it wants to go. |
void |
shootArrow(java.lang.String d)
This takes the node that the arrow is to be shot at. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BaseMove(Node n)
n
- create a move with a current nodepublic BaseMove(Node n, java.lang.String d)
Method Detail |
public void setCurrentNode(Node n)
setCurrentNode
in interface Move
n
- current node to movepublic Node getCurrentNode()
getCurrentNode
in interface Move
public void shootArrow(java.lang.String d)
shootArrow
in interface Move
d
- the direction to move topublic java.lang.String getShotDirection()
getShotDirection
in interface Move
public boolean isArrowShot()
isArrowShot
in interface Move
public void pickUpGold()
pickUpGold
in interface Move
public boolean isGoldPickedUp()
isGoldPickedUp
in interface Move
public java.lang.String getMoveDirection()
getMoveDirection
in interface Move
public void setMoveDirection(java.lang.String m)
setMoveDirection
in interface Move
m
- the direction to go
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |