summaryrefslogtreecommitdiffstats
path: root/lib/Bot/Games/Game/24.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bot/Games/Game/24.pm')
-rw-r--r--lib/Bot/Games/Game/24.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm
index b5f50ad..ed5263d 100644
--- a/lib/Bot/Games/Game/24.pm
+++ b/lib/Bot/Games/Game/24.pm
@@ -4,6 +4,7 @@ extends 'Bot::Games::Game';
use List::Util qw/shuffle/;
use Math::Expression::Evaluator;
+use Time::Duration;
has '+help' => (
default => '24 help',
@@ -36,7 +37,9 @@ augment turn => sub {
my $eval = $self->evaluate($expr);
if (defined($eval) && $eval == 24) {
$self->is_over(1);
- return "$player wins!";
+ return "$player wins! ("
+ . concise(duration_exact(time - $self->start_time->epoch))
+ . ")";
}
else {
return "$expr = " . (defined($eval) ? $eval : 'undef');