/usr/share/games/colobot/ai/tradar1.txt is in colobot-common 0.1.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | extern void object::Example( )
{
while ( true )
{
object spot;
float dir;
spot = radar(WayPoint);
if ( spot == null ) // no more ?
{
motor(0, 0); // stops
break;
}
dir = direction(spot.position);
if ( dir < 0 ) // on the right ?
{
motor(1, 1+dir/90);
}
else // on the left ?
{
motor(1-dir/90, 1);
}
}
}
|