|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| 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 node
public BaseMove(Node n,
java.lang.String d)
| Method Detail |
public void setCurrentNode(Node n)
setCurrentNode in interface Moven - current node to movepublic Node getCurrentNode()
getCurrentNode in interface Movepublic void shootArrow(java.lang.String d)
shootArrow in interface Moved - the direction to move topublic java.lang.String getShotDirection()
getShotDirection in interface Movepublic boolean isArrowShot()
isArrowShot in interface Movepublic void pickUpGold()
pickUpGold in interface Movepublic boolean isGoldPickedUp()
isGoldPickedUp in interface Movepublic java.lang.String getMoveDirection()
getMoveDirection in interface Movepublic void setMoveDirection(java.lang.String m)
setMoveDirection in interface Movem - the direction to go
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||