# Option initial-set-team-color Allows to set the team color in the initial state of a game ## State Machine ## State initial
If that state is active,
> | The option stand-and-display-robot-number is executed.
The decision tree:
Pseudo code of the decision tree:
if ( | game.team-color == red | ) | // team color is red
{
transition-to-state(red);
}
else
{
transition-to-state(blue);
}
## State red
If that state is active,
> | The option stand-and-display-robot-number is executed.
> | These output symbols are set:
| game.set-team-color | = | red
The decision tree:
Pseudo code of the decision tree:
if ( | robot-state.fore-back-button-pressed-short | ) | // front back switch pressed
{
transition-to-state(blue);
}
else
{
transition-to-state(red);
}
## State blue
If that state is active,
> | The option stand-and-display-robot-number is executed.
> | These output symbols are set:
| game.set-team-color | = | blue
| leds.back-front-blue | = | back-front-blue.llll
| leds.back-rear-red | = | back-rear-red.oooo
The decision tree:
Pseudo code of the decision tree:
if ( | robot-state.hind-back-button-pressed-short | ) | // rear back switch pressed
{
transition-to-state(red);
}
else
{
transition-to-state(blue);
}