I am attempting to code a python bot for realtimebattle 1.0.8, running on
Cygwin and Python 2.4.1. The python example included with the distribution
(razziel) froze RTB. When I added a line to the while loop
(x=3Draw_input('')), the bot worked, but the color and name are not specifi=
This is about as simple as it gets, so here is an example with razziel:
This produces a robot that moves about the arena and fires, but does not se=
a name (I have tried various settings of "robot startup time" in options):
print 'RobotOption 3 0\n'
print 'RobotOption 1 1\n'
print 'Name razziel\n'
print 'Colour 005500 330066\n'
while (x !=3D 'Dead') or (x !=3D 'GameFinishes'):
print 'Accelerate 0.5\n'
print 'Rotate 7 3\n'
for i in range(0,10):
print 'Shoot 10\n'
However, if the entire while loop is commented out, the (then unmoving)
robot does set a name. When I log the stdin, I find that I get "Warning 5"
which appears to suggest that the key words are not correct; however, I
cannot see what is wrong. I am not too concerned about this because I can
create nameless bots that work; however, I would like to know if I am
missing something about how Python communicates to RTB with stdin/stdout. I=
anybody has an example of a Python bot that works correctly, I would love t=