mirror of https://github.com/dirtbags/moth.git
23 lines
442 B
Python
23 lines
442 B
Python
import time
|
|
from tanks import Pflanzarr
|
|
import sys
|
|
|
|
T = 60*5
|
|
|
|
try:
|
|
while 1:
|
|
start = time.time()
|
|
p = Pflanzarr.Pflanzarr(sys.argv[1], sys.argv[2])
|
|
p.run(int(sys.argv[3]))
|
|
|
|
diff = time.time() - start
|
|
if diff - T > 0:
|
|
time.sleep( diff - T )
|
|
|
|
except:
|
|
import traceback
|
|
traceback.print_exc()
|
|
print 'Usage: python2.6 run_tanks.py data_dir easy|medium|hard max_turns'
|
|
|
|
|