This commit is contained in:
Barak Michener 2013-07-29 18:54:05 -04:00
parent a64734005d
commit 9eb3625393

11
tim.py
View file

@ -265,6 +265,7 @@ def main():
namemap = {}
while True:
try:
command_str = raw_input("%s> " % game)
command_list = command_str.strip().split(" ")
command = command_list[0]
@ -296,15 +297,16 @@ def main():
print "%d: %s" % (i, name)
continue
elif command == "vote":
team = [int(x) for x in raw_input("Team? ").strip().split(" ")]
votes = [int(x) for x in raw_input("Votes? ").strip().split(" ")]
input = raw_input("Team? ").strip()
team = [int(x) for x in input]
votes = [int(x) for x in raw_input("Votes? ").strip()]
round = int(raw_input("Round? ").strip())
game.do_vote(team, votes, round)
game.trace = []
continue
elif command == "mission":
team = [int(x) for x in raw_input("Team? ").strip().split(" ")]
team = [int(x) for x in raw_input("Team? ").strip()]
fails = int(raw_input("# of Fails? ").strip())
must = int(raw_input("Spys must fail? ").strip()) == 1
round = int(raw_input("Round? ").strip())
@ -347,6 +349,9 @@ def main():
else:
puts(colored.red("Unknown command: %s" % command))
continue
except Exception:
print "\n"
continue