File: tfor2.txt

package info (click to toggle)
colobot 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 415,532 kB
  • sloc: cpp: 129,246; ansic: 8,872; python: 2,158; sh: 672; awk: 91; xml: 35; makefile: 31
file content (10 lines) | stat: -rw-r--r-- 226 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
extern void object::Example( )
{
	for ( int i=0 ; i<4 ; i=i+1 )  // repeat 4 times
	{
		move(10);   // move 10m forward
		turn(90);   // quarter turn left
		fire(1);    // destroy the target
		turn(-180); // turns around
	}
}