It is currently Sun Sep 23, 2018 8:50 pm Advanced search

interactive-tron.py with java code

Code won't compile? Found a bug? Post here!

interactive-tron.py with java code

Postby mtardibu » Tue Feb 02, 2010 7:43 pm

I have trouble running the interactive-tron with the sample Java code.
I tried:
% javac *.java
% python interactive-tron.py MyTronBot.java 20,20 1,1 19,19
And got:
Traceback (most recent call last):
File "interactive-tron.py", line 122, in <module>
bot.stdin.write("%d %d\n" % (width+2, height+2))
IOError: [Errno 32] Broken pipe

Did I do anything wrong?

Michael Tardibuono
mtardibu
Cadet
 
Posts: 2
Joined: Tue Feb 02, 2010 2:03 am

Re: interactive-tron.py with java code

Postby mtardibu » Tue Feb 02, 2010 8:10 pm

Before anyone else answers my question, I'd like to say that I got it.

I should have done:
% javac *.java
% python interactive-tron.py "java MyTronBot" 30,30 1,1 30,30
mtardibu
Cadet
 
Posts: 2
Joined: Tue Feb 02, 2010 2:03 am


Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron