# Option kicklogger-run Walk to ball and kick at random position ## State Machine ## State wait-for-align-and-start
This state is a target state.
If that state is active,
> | The option kicklogger-align is executed.
The decision tree:
Pseudo code of the decision tree:
if ( |
( |
( | robot-state.any-back-button-pressed-short-and-released | )
( | game.state == game.state.playing | )
| )
&& |
( | subsequent-option-reached-target-state | )
| ) | // back pressed
{
transition-to-state(kick);
}
else
{
transition-to-state(wait-for-align-and-start);
}
## State kick
If that state is active,
> | The option kicklogger-walkandkick is executed.
The decision tree:
Pseudo code of the decision tree:
if ( | subsequent-option-reached-target-state | ) | // kick is set
{
transition-to-state(save);
}
else
{
transition-to-state(kick);
}
## State save
If that state is active,
> | The basic behavior stand is executed.
The decision tree:
Pseudo code of the decision tree:
if ( | kicklogger.save | ) | // call successful
{
transition-to-state(checkborder);
}
else
{
transition-to-state(save);
}
## State checkborder
If that state is active,
> | The option kicklogger-checkborder is executed.
The decision tree:
Pseudo code of the decision tree:
if ( | subsequent-option-reached-target-state | ) | // ball moved out of border
{
transition-to-state(retreat);
}
else
{
transition-to-state(checkborder);
}
## State retreat
If that state is active,
> | The option kicklogger-retreat is executed.
> | These output symbols are set:
| head-control-mode | = | head-control-mode.search-auto
The decision tree:
Pseudo code of the decision tree:
if ( | subsequent-option-reached-target-state | ) | // kick is set
{
transition-to-state(wait-for-align-and-start);
}
else
{
transition-to-state(retreat);
}