import sys from game import * MOVES = ["declare", "discard", "challenge", "accept"] game = Game(sys.argv[1:]) while game.state.move != "end": print "%s is to %s, %s is the customs officer" % (game.state.player, game.state.move, game.customs_officer) print "Which player are you?" for p in range(len(game.players)): print "%s. %s" % (p, game.players[p]) p = int(raw_input()) player = game.players[p] if player == game.state.player and game.state.move == "declare": print "Your current hand is %s" % game.state.hand print "What is your move?" for i in range(len(MOVES)): print "%s. %s" % (i, MOVES[i]) move = MOVES[int(raw_input())] extra = raw_input("Extra parameters? ") try: if extra: game.move(player, move, extra) else: game.move(player, move) except GameException, e: print "ERROR", e for p in game.players: print "%s: $%s" % (p, p.money)