summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-27 00:11:38 -0500
committerdoy <doy@tozt.net>2009-04-27 00:11:38 -0500
commit6322ffbfd2f6d109dde80d8e7c4847be27a4db43 (patch)
treed4cc278d40b1bedbdd39d9ae2a8297a5ea6fbce3
parent2d4a2a9aaf6c1da20c2bd6200b05046153c947b4 (diff)
downloadbot-games-6322ffbfd2f6d109dde80d8e7c4847be27a4db43.tar.gz
bot-games-6322ffbfd2f6d109dde80d8e7c4847be27a4db43.zip
make 24 only generate 2 digit numbers at most
-rw-r--r--lib/Bot/Games/Game/24.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm
index e8790f4..b5f50ad 100644
--- a/lib/Bot/Games/Game/24.pm
+++ b/lib/Bot/Games/Game/24.pm
@@ -77,6 +77,7 @@ sub generate_24 {
$n1 *= $val;
$n2 = $n1 / $val;
}
+ redo if $n1 >= 100 || $n2 >= 100;
splice @nums, $index, 1, ('(', $n1, $op, $n2, ')');
}
pop @nums;