added TODO's

This commit is contained in:
Bibin Muttappillil 2020-07-12 15:53:49 +02:00
parent ec446785ee
commit a4652642d1
2 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class Game:
await self.for_all_player(lambda p: p.send_info(f"Your role: **{p.night_role.name()}**")) await self.for_all_player(lambda p: p.send_info(f"Your role: **{p.night_role.name()}**"))
async def night_phases(self): async def night_phases(self):
# TODO: implement waiting if role in middle
await asyncio.gather(*[self.role[r].query() for r in [Doppelganger, Seer, Robber, Troublemaker, Drunk]]) # slow await asyncio.gather(*[self.role[r].query() for r in [Doppelganger, Seer, Robber, Troublemaker, Drunk]]) # slow
await self.role[Doppelganger].send_copy_info() await self.role[Doppelganger].send_copy_info()
await self.role[Doppelganger].simulate() # slow await self.role[Doppelganger].simulate() # slow

View File

@ -49,6 +49,7 @@ class Player:
text = f"{question}\n" + f"{'='*len(question)}\n\n" + '\n'.join(f"[{str(i)}]({str(options[i])})" for i in range(len(options))) text = f"{question}\n" + f"{'='*len(question)}\n\n" + '\n'.join(f"[{str(i)}]({str(options[i])})" for i in range(len(options)))
await self.dm.send(f"```md\n{text}```") await self.dm.send(f"```md\n{text}```")
# TODO: Basic Converters (https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#basic-converters)
def check_num(self, choice, N): def check_num(self, choice, N):
if not choice.isdigit(): if not choice.isdigit():
raise ValueError(f"Your choice {choice} is not a number") raise ValueError(f"Your choice {choice} is not a number")