#!/usr/bin/python import msg_parser from world import * from pygraphlib import * import time import sys def get_chunk(x): lines = [] l = sys.stdin.readline() if l == 'game-over': return '' while l != x: lines.append(l) l = raw_input() lines.append(l) skel = '\n'.join(lines) return skel def main(): print 'reg: Al-Capone robber' sys.stdout.flush() sm = StateMachine(get_chunk('wsk/')) while 1: s = get_chunk('wor/') if not s: print >> sys.stderr, 'GAME COMPLETED' break sm.world_update(s) sm.move() sys.stdout.flush() if __name__=='__main__': main()