def botPick(self, ctx, bot, game):
# Has the bot pick their card
blackNum = game['BlackCard']['Pick']
if blackNum == 1:
cardSpeak = 'card'
else:
cardSpeak = 'cards'
i = 0
cards = []
while i < blackNum:
randCard = random.randint(0, len(bot['Hand'])-1)
cards.append(bot['Hand'].pop(randCard)['Text'])
i += 1
await self.typing(game)
# Make sure we haven't laid any cards
if bot['Laid'] == False and game['Judging'] == False:
newSubmission = { 'By': bot, 'Cards': cards }
game['Submitted'].append(newSubmission)
# Shuffle cards
shuffle(game['Submitted'])
bot['Laid'] = True
game['Time'] = currentTime = int(time.time())
await self.checkSubmissions(ctx, game, bot)
评论列表
文章目录