eval
This commit is contained in:
parent
a64734005d
commit
9eb3625393
1 changed files with 84 additions and 79 deletions
11
tim.py
11
tim.py
|
|
@ -265,6 +265,7 @@ def main():
|
||||||
namemap = {}
|
namemap = {}
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
command_str = raw_input("%s> " % game)
|
command_str = raw_input("%s> " % game)
|
||||||
command_list = command_str.strip().split(" ")
|
command_list = command_str.strip().split(" ")
|
||||||
command = command_list[0]
|
command = command_list[0]
|
||||||
|
|
@ -296,15 +297,16 @@ def main():
|
||||||
print "%d: %s" % (i, name)
|
print "%d: %s" % (i, name)
|
||||||
continue
|
continue
|
||||||
elif command == "vote":
|
elif command == "vote":
|
||||||
team = [int(x) for x in raw_input("Team? ").strip().split(" ")]
|
input = raw_input("Team? ").strip()
|
||||||
votes = [int(x) for x in raw_input("Votes? ").strip().split(" ")]
|
team = [int(x) for x in input]
|
||||||
|
votes = [int(x) for x in raw_input("Votes? ").strip()]
|
||||||
round = int(raw_input("Round? ").strip())
|
round = int(raw_input("Round? ").strip())
|
||||||
game.do_vote(team, votes, round)
|
game.do_vote(team, votes, round)
|
||||||
game.trace = []
|
game.trace = []
|
||||||
continue
|
continue
|
||||||
|
|
||||||
elif command == "mission":
|
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())
|
fails = int(raw_input("# of Fails? ").strip())
|
||||||
must = int(raw_input("Spys must fail? ").strip()) == 1
|
must = int(raw_input("Spys must fail? ").strip()) == 1
|
||||||
round = int(raw_input("Round? ").strip())
|
round = int(raw_input("Round? ").strip())
|
||||||
|
|
@ -347,6 +349,9 @@ def main():
|
||||||
else:
|
else:
|
||||||
puts(colored.red("Unknown command: %s" % command))
|
puts(colored.red("Unknown command: %s" % command))
|
||||||
continue
|
continue
|
||||||
|
except Exception:
|
||||||
|
print "\n"
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue