summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/games/uno.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-09 22:02:00 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-09 22:22:06 +0200
commit30ddc82becc5fde75f95b1f395bd66d1de4c09a3 (patch)
tree958bc9c0c168898646501a9336470eafffdbefa6 /data/rbot/plugins/games/uno.rb
parenta0be4e1a5d71b55dadf5cf3fa976c784a0581d52 (diff)
uno plugin: fix playing cards after a Reverse after a +something
Diffstat (limited to 'data/rbot/plugins/games/uno.rb')
-rw-r--r--data/rbot/plugins/games/uno.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index 8db3c7fe..56a7b99c 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -263,6 +263,7 @@ class UnoGame
end
if card.picker > 0
@picker += card.picker
+ @last_picker = @discard.picker
end
if card.special?
@special = true
@@ -283,7 +284,7 @@ class UnoGame
# the correct color
# TODO make optional
if @picker > 0
- if (card.value == 'Reverse' and card.color == @color) or card.picker >= @discard.picker
+ if (card.value == 'Reverse' and card.color == @color) or card.picker >= @last_picker
return true
else
return false