public class AttackingState extends java.lang.Object implements State
This state has only one possible action:
This state can lead to:
Constructor and Description |
---|
AttackingState() |
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 is outside of movement range
Go to Defending state if the team doesnt have the ball and the agent doesnt have the ball
Go to Support state if the agent doesn't have the ball but the team does have the ball
|
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)
State
processModel
in interface State
context
- The agent 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.