diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-10-31 15:27:49 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-10-31 15:27:49 -0500 |
commit | da36dca6178721b1c91b5e680d01e2595c2b1801 (patch) | |
tree | 63be2a91e3c92d62ec336eb49679aecc20b68d9d /lib/Bot/Games | |
parent | 868f0c827a3f88d6280168ff63487babda5d8b01 (diff) | |
download | bot-games-da36dca6178721b1c91b5e680d01e2595c2b1801.tar.gz bot-games-da36dca6178721b1c91b5e680d01e2595c2b1801.zip |
prevent ridiculous numbers in 24
Diffstat (limited to 'lib/Bot/Games')
-rw-r--r-- | lib/Bot/Games/Game/24.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm index b56db41..a353900 100644 --- a/lib/Bot/Games/Game/24.pm +++ b/lib/Bot/Games/Game/24.pm @@ -83,6 +83,7 @@ sub generate_24 { $n1 *= $val; $n2 = $n1 / $val; } + redo if $n1 >= 1000 || $n2 >= 1000; splice @nums, $index, 1, ('(', $n1, $op, $n2, ')'); } pop @nums; |