summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/Game/24.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-12-18 06:19:11 -0500
committerdoy <doy@tozt.net>2008-12-18 06:19:11 -0500
commitefbc0bb8462caef6443391e83828769cc35db239 (patch)
treedab21ef87851cce3f0c4be6412b482190465df10 /lib/Bot/Games/Game/24.pm
parentc11fa97a98e4910ed5bdd1e2c581041107b846a9 (diff)
downloadbot-games-efbc0bb8462caef6443391e83828769cc35db239.tar.gz
bot-games-efbc0bb8462caef6443391e83828769cc35db239.zip
keep track of the numbers currently being used, for later querying
Diffstat (limited to 'lib/Bot/Games/Game/24.pm')
-rw-r--r--lib/Bot/Games/Game/24.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm
index 928a196..3848723 100644
--- a/lib/Bot/Games/Game/24.pm
+++ b/lib/Bot/Games/Game/24.pm
@@ -7,6 +7,11 @@ has '+help' => (
default => '24 help',
);
+has state => (
+ is => 'rw',
+ isa => 'Str',
+);
+
has _solution => (
is => 'rw',
isa => 'Str',
@@ -71,7 +76,8 @@ sub _generate_24 {
pop @nums;
shift @nums;
$self->_solution(join '', @nums);
- return join ' ', (grep { /\d/ } @nums);
+ $self->state(join ' ', (grep { /\d/ } @nums));
+ return $self->state;
}
sub _evaluate {