>xabsl 2
Behavior Documentation
>
Index
>Agents
>Symbols
>Basic Behaviors
>Options
>> initial-set-team-color
>>>
initial
>>>
red
>>>
blue
Option initial-set-team-color
Allows to set the team color in the initial state of a game
State Machine
This browser can't display the SVG file
svg/option_initial-set-team-color.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
State initial
If that state is active,
>
The option
stand-and-display-robot-number
is executed.
The decision tree:
This browser can't display the SVG file
svg/option_initial-set-team-color_state_initial.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
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:
This browser can't display the SVG file
svg/option_initial-set-team-color_state_red.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
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:
This browser can't display the SVG file
svg/option_initial-set-team-color_state_blue.svg
.
The
Adobe SVG Viewer 3.0
can be downloaded from
http://www.adobe.com/svg/viewer/install/main.html
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
);
}