summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-09 16:57:01 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-04-09 16:57:01 +0200
commit27a15c00d2e34b0b6c3cdc4c4bb3ce8de8fe8539 (patch)
tree491a346c87178c8f9dc3931fbcbb91d62b4c76c2 /data/rbot
parent8e29e43bf836a0dba8d10aa361619b60f07b57b9 (diff)
uno game: non-wilds can't be played on a +something unless they're the right color
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/games/uno.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb
index 90a8ee48..13f39c9b 100644
--- a/data/rbot/plugins/games/uno.rb
+++ b/data/rbot/plugins/games/uno.rb
@@ -274,6 +274,9 @@ class UnoGame
# a +something of same or higher something, or a Reverse
# 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
return true
else