summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/games
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-12-08 12:54:45 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-12-08 12:54:45 +0100
commitb781d7259bf147a47b5ee575beb255b0afa08feb (patch)
tree892d9727d876006bec25726e34985c74dd5f45b8 /data/rbot/plugins/games
parentef12f7fe7723a789d0a79be14853166ea64ffc83 (diff)
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.
Diffstat (limited to 'data/rbot/plugins/games')
-rw-r--r--data/rbot/plugins/games/uno.rb1
1 files changed, 1 insertions, 0 deletions
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