Help they said
EXAMPLES: Example 1 [doc/art/sav/2.txt]: !_<.>!~??~!_[..]! First two exclamation points means between them you need to describe commands. There is one description: _<.> which means that command _ is binded to first command (which is moving left/right) ~ means next part these two question points mean between them you need to describe scans. There are no scans described. ~ means next part rest of it is real code !_[..]! these two exclamation points indicate that between it's command between them, command is _ (which we binded to first command in command section). there is parameter in  it's two (..) and that means that robot will go right (or turn right if it's flying robot). When code execution ends it repeats. Example 2 [doc/art/sav/1.txt]: !_<.>:<..>-<...>!~?.<..>?~(<?.[..]?>||..)<!:!>:(<?.[..]?>||...)<!-!>!_[..]! Command section is: _<.>:<..>-<...> which means _ is binded to first command, : to second and - to third. Scan section is: .<..> which means . is binded to second scan. Code section is: (<?.[..]?>||..)<!:!>:(<?.[..]?>||...)<!-!>!_[..]! We have if at beginning. Condition is in (): <?.[..]?>||.. <??> means between them is scan. It's . (which we binded to second scan in scans section and it scans things in front of robot). there is parameter in  it's two (..) and that means that it will return 1 if nothing is in front of robot, 2 if there is wall, 3 if there is enemy. || means ==, so if scan return 2 (..) it will be true that means if it's wall in front of robot. If condition is true code between <> executes, so command : executes (command binded to second command - jump). : means else and () is another condition (so it's actually elif) In condition there is: <?.[..]?>||... which is like previous condition but has 3 on end so if in front of robot is enemy it will be true. If condition is true code between <> executes, so command - executes (command binded to third command - fire). After it there is command (note: that command will alway be executed): _[..] command _ executes (command binded to first command - walk). It has parameter 2 (..) so robt will go right.
(log in to comment)