From: Giuseppe Bilotta Date: Wed, 9 Apr 2008 14:57:01 +0000 (+0200) Subject: uno game: non-wilds can't be played on a +something unless they're the right color X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=27a15c00d2e34b0b6c3cdc4c4bb3ce8de8fe8539;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git uno game: non-wilds can't be played on a +something unless they're the right color --- 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