Public Member Functions | |
| Agent (String name) | |
| String | getName () |
| Point | getPosition () |
| Get current agent position. | |
| boolean | senseBomb () |
| Sense if agent is carrying a bomb. | |
| boolean | isEntered () |
| Check if agent is "entered" in the environment. | |
| void | reset () |
| Called by the interpreter when the agent this instance refers to is reset. | |
| String | toString () |
| returns the unique name of the agent this instance refers to. | |
| void | deleteObservers () |
| removes all listeners | |
Public Attributes | |
| transient Signal | signalMove = new Signal("agent attempts move") |
| emitted if agent attemps movement (succesful or not) | |
| transient Signal | signalPickupBomb = new Signal("agent attempts pickup") |
| emitted if agent attemps to pickup a bomb (succesful or not) | |
| transient Signal | signalDropBomb = new Signal("agent attempts drop") |
| emitted if agent attemps to drop a bomb (succesful or not) | |
| transient Signal | signalMoveSucces = new Signal("agent succesful move") |
| emitted if agent succesfully moves | |
| transient Signal | signalPickupBombSucces = new Signal("agent succesful pickup") |
| emitted if agent (succesfully) picks up a bomb | |
| transient Signal | signalDropBombSucces = new Signal("agent sucessful drop") |
| emitted if agent (succesfully) drops a bomb | |
Protected Attributes | |
| String | _name |
Package Attributes | |
| Point | _position = null |
| _position is null means agent did not enter the world. | |
| boolean | _bomb = false |
|
|
Get current agent position.
|
|
|
Check if agent is "entered" in the environment. That is, it has a position in the world.
|
|
|
Called by the interpreter when the agent this instance refers to is reset.
|
|
|
Sense if agent is carrying a bomb.
|
|
|
returns the unique name of the agent this instance refers to.
|
|
|
_position is null means agent did not enter the world. This method is only for the blockworld package to prevent setting the position by other means that through the north/south/west/east methods of the environment.
|
1.3.7