|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Controllable<ACTION,STATE,CLIENT>
A Controllable is an element of a simulator that can be controlled by a client. At each timestep, a controllable must provide a non-empty set of actions that a client can select from to respond to the current state of the simulator. After providing this set, the controllable must accept and appropriately follow an action submitted to it, unless that action is not an element of the set of actions provided. The behavior upon receiving an illegal action is undefined. The simulator should be able to read a controllable's currently set action and update one or more simulator objects based on that action.
Method Summary | |
---|---|
void |
endAction(STATE state,
CLIENT client)
|
java.lang.String |
getName()
Return this controllable's unique identifying name. |
Record |
getRecord()
Return this controllable's statistic information. |
boolean |
isLegal(ACTION action)
Indicates whether the given action is legal for the controllable. |
void |
startAction(STATE state,
CLIENT client)
|
Method Detail |
---|
boolean isLegal(ACTION action)
action
-
void startAction(STATE state, CLIENT client)
void endAction(STATE state, CLIENT client)
java.lang.String getName()
Record getRecord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |