From 27a15c00d2e34b0b6c3cdc4c4bb3ce8de8fe8539 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 9 Apr 2008 16:57:01 +0200 Subject: uno game: non-wilds can't be played on a +something unless they're the right color --- data/rbot/plugins/games/uno.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'data/rbot') 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 -- cgit v1.2.3