From b781d7259bf147a47b5ee575beb255b0afa08feb Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 8 Dec 2010 12:54:45 +0100 Subject: UNO!: early exit when checking if W+4 was legal Exit as soon as we find a card that reveals that the W+4 was not a valid move. --- data/rbot/plugins/games/uno.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'data') diff --git a/data/rbot/plugins/games/uno.rb b/data/rbot/plugins/games/uno.rb index 6a056278..e6a7ea18 100644 --- a/data/rbot/plugins/games/uno.rb +++ b/data/rbot/plugins/games/uno.rb @@ -498,6 +498,7 @@ class UnoGame lp.cards.each do |c| if c.color == @last_color and not c.special? legal = false + break end end if legal -- cgit v1.2.3