/usr/share/games/colobot/ai/tremot4b.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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | public class order
{
int m_type = nan;
float m_param;
}
public class exchange
{
static private order m_order = new order;
// Put an order
synchronized bool put(order a)
{
if ( m_order.m_type == nan )
{
m_order = a;
return true;
}
else
{
return false;
}
}
// Get an order
synchronized order get()
{
return m_order;
}
// Delete an order.
synchronized void delete()
{
m_order.m_type = nan;
}
}
extern void object::Slave4( )
{
exchange list();
order todo;
while ( true )
{
while ( true )
{
todo = list.get();
if ( todo.m_type != nan ) break;
wait(1);
}
if ( todo.m_type == 1 )
{
message("move("+todo.m_param+")");
move(todo.m_param);
}
else if ( todo.m_type == 2 )
{
message("turn("+todo.m_param+")");
turn(todo.m_param);
}
else
{
message("Unknown order");
}
list.delete();
}
}
|