summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/rbot/plugins/games/uno.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index 1d49642c..0b7f8ba6 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -279,13 +279,11 @@ class UnoGame
def can_play(card)
# When a +something is online, you can only play
- # a +something of same or higher something, or a Reverse
+ # a +something of same or higher something, or a Reverse of
+ # the correct color
# TODO make optional
if @picker > 0
- if card.color and card.color != @color
- return false
- end
- if card.value == 'Reverse' or card.picker >= @discard.picker
+ if (card.value == 'Reverse' and card.color == @color) or card.picker >= @discard.picker
return true
else
return false