36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
![]() |
\b;Exercise
|
||
|
Convert some \l;titanium ore\u object\titanore; to \l;titanium cubes\u object\titan;, then drop 2 titanium cubes on the pads whose coordinates are:
|
||
|
\c;
|
||
|
x=10, y=-60
|
||
|
x=10, y=-65
|
||
|
\n;
|
||
|
\image derrick 8 8;
|
||
|
The \l;derrick\u object\derrick; extracts titanium ore from the subsoil; you just have to pick it up.
|
||
|
|
||
|
\image convert 8 8;
|
||
|
The \l;converter\u object\convert; converts titanium ore to titanium cubes. Just drop the titanium ore on the platform, move backward, and wait until it has been converted.
|
||
|
|
||
|
\b;General principle
|
||
|
Repeat two times :
|
||
|
o Wait until there is some titanium ore.
|
||
|
o Go to the titanium ore.
|
||
|
o Pick it up.
|
||
|
o Go to the converter.
|
||
|
o Drop the titanium ore.
|
||
|
o Move back 2.5 meters.
|
||
|
o Wait until there is a titanium cube.
|
||
|
o Pick up the titanium cube.
|
||
|
o Go to the platform.
|
||
|
o Drop the titanium cube.
|
||
|
|
||
|
\b;Useful instructions
|
||
|
\c;\l;for\u cbot\for;\n; to repeat some instructions
|
||
|
\c;\l;do - while\u cbot\do;\n; to repeat some instructions
|
||
|
\c;\l;radar\u cbot\radar;\n; to look for different objects
|
||
|
\c;\l;goto\u cbot\goto;\n; to move the bot
|
||
|
\c;\l;grab\u cbot\grab;\n; to grab an object
|
||
|
\c;\l;drop\u cbot\drop;\n; to drop an object
|
||
|
|
||
|
\t;See also
|
||
|
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
|