fix bot draw/play

This commit is contained in:
Gordon Shumway 2019-02-14 01:16:04 -05:00 committed by GitHub
parent 9558d05fcc
commit 747d2da58c
1 changed files with 2 additions and 0 deletions

View File

@ -521,6 +521,8 @@ class Uno(callbacks.Plugin):
# always play the card if possible
ncards=len(self.game[table]['players'][nick]['hand'])
irc.reply("%s draws a card, and plays it; It's a %s (%s cards left in hand)." % (nick, card, ncards), to=channel)
self.game[table]['players'][nick]['hand'].remove(card)
self.game[table]['discard'].append(card)
else:
# Can't play a card, end turn
ncards=len(self.game[table]['players'][nick]['hand'])