public class DefendingState extends java.lang.Object implements State
This is the state an agent should be in whenever the ball is within the agent's movement range and neither the team nor the agent has possession of the ball.
This state has only one possible action:
This state can lead to:
| Constructor and Description |
|---|
DefendingState() |
| 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)
Using the current game state, decide what action to take.
|
void |
updateState(StateMachine stateMachine,
EnvironmentModel model)
Go to passive state if the ball moves outside of movement area
Go to support state if another team mate gets the ball
Go to Attack state if this agent wins possession of the ball
|
public void enterState(CommandPlayer context)
StateenterState in interface Statecontext - The agent to which this state appliespublic void exitState(CommandPlayer context)
Statepublic void processModel(CommandPlayer context, EnvironmentModel model)
StateprocessModel in interface Statecontext - The agent to which this state appliesmodel - Model containing the current game state.public void updateState(StateMachine stateMachine, EnvironmentModel model)
updateState in interface StatestateMachine - State Machine to update.model - Model containing the current game state.