From 28414ec3a9ea3153a001102241bc1feb46ba4a38 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 9 Apr 2008 21:47:21 +0200 Subject: uno plugin: fix playability check for Reverse vs +x --- data/rbot/plugins/games/uno.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'data/rbot/plugins/games/uno.rb') 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 -- cgit v1.2.3