/usr/share/games/colobot/ai/tfollow2.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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | extern void object::Hare( )
{
int nb = 0;
while ( true )
{
point dest;
float dist;
object bot;
do
{
dest.x = 8+rand()*24;
dest.y = -89.5+rand()*24;
dist = distance(dest, position);
}
while ( dist < 10 );
goto(dest);
wait(2);
bot = radar(PracticeBot, 0, 360, 0, 10);
if ( bot == null )
{
nb = 0;
message("Failure, you are too far away. Start again 10x.");
}
else
{
nb ++;
if ( nb < 10 )
{
message("Distance OK, "+(10-nb)+" more to come");
}
else
{
message("Well done, let's go home.");
goto(-2, -77.5, 0);
break;
}
}
}
}
|