public class PassiveState extends java.lang.Object implements State
This state has two possible action:
This state can lead to:
Constructor and Description |
---|
PassiveState() |
Modifier and Type | Method and Description |
---|---|
void |
enterState(CommandPlayer context)
Called when a state is entered.
|
void |
exitState(CommandPlayer context)
Called when a state is exited.
|
void |
processModel(CommandPlayer context,
EnvironmentModel model)
If the ball is not within the movement range, got to home area and face
the ball's location
|
void |
updateState(StateMachine stateMachine,
EnvironmentModel model)
If the model is within the movement range, update the state before
processing the model.
|
public void enterState(CommandPlayer context)
State
enterState
in interface State
context
- The agent to which this state appliespublic void exitState(CommandPlayer context)
State
public void processModel(CommandPlayer context, EnvironmentModel model)
processModel
in interface State
context
- The angent to which this state appliesmodel
- Model containing the current game state.public void updateState(StateMachine stateMachine, EnvironmentModel model)
updateState
in interface State
stateMachine
- State Machine to update.model
- Model containing the current game state.