diff options
author | doy <doy@tozt.net> | 2009-01-25 02:16:28 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-01-25 02:16:28 -0500 |
commit | f8efc56290fd0c78ba21ba72636b9569c7e46953 (patch) | |
tree | 6e09cabe52f7813b27585827fdb189f45c0bb802 /lib/Bot/Games/Game/24.pm | |
parent | 5568b19423752e0ef2f07c766392d517f1d609d0 (diff) | |
download | bot-games-f8efc56290fd0c78ba21ba72636b9569c7e46953.tar.gz bot-games-f8efc56290fd0c78ba21ba72636b9569c7e46953.zip |
randomize the order of the numbers returned by @24
Diffstat (limited to 'lib/Bot/Games/Game/24.pm')
-rw-r--r-- | lib/Bot/Games/Game/24.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Bot/Games/Game/24.pm b/lib/Bot/Games/Game/24.pm index a991126..839ff2c 100644 --- a/lib/Bot/Games/Game/24.pm +++ b/lib/Bot/Games/Game/24.pm @@ -3,6 +3,8 @@ package Bot::Games::Game::24; use Bot::Games::OO; extends 'Bot::Games::Game'; +use List::Util qw/shuffle/; + has '+help' => ( default => '24 help', ); @@ -83,7 +85,7 @@ sub generate_24 { pop @nums; shift @nums; $self->solution(join '', @nums); - $self->state(join ' ', (grep { /\d/ } @nums)); + $self->state(join ' ', shuffle(grep { /\d/ } @nums)); return $self->state; } |