/usr/share/games/colobot/ai/tremot3b.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 43 44 45 46 47 48 49 50 51 52 | public class exchange
{
static private string m_order = "";
// Put an order
synchronized bool put(string order)
{
if ( m_order == "" )
{
m_order = order;
return true;
}
else
{
return false;
}
}
// Get an order
synchronized string get()
{
string ret = m_order;
m_order = "";
return ret;
}
}
extern void object::Slave3( )
{
exchange list();
string todo;
while ( true )
{
while ( true )
{
todo = list.get();
if ( todo != "" ) break;
wait(1);
}
message(todo);
if ( strfind(todo, "move") == 0 )
{
move(strval(strmid(todo,5)));
}
if ( strfind(todo, "turn") == 0 )
{
turn(strval(strmid(todo,5)));
}
}
}
|