diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-08 12:54:45 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2010-12-08 12:54:45 +0100 |
commit | b781d7259bf147a47b5ee575beb255b0afa08feb (patch) | |
tree | 892d9727d876006bec25726e34985c74dd5f45b8 /data/rbot/plugins/games | |
parent | ef12f7fe7723a789d0a79be14853166ea64ffc83 (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.rb | 1 |
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 |