Acme-Hospital-Bed
view release on metacpan or search on metacpan
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
=head1 NAME
Acme::Hospital::Bed - The great new Acme::Hospital::Bed!
=head1 VERSION
Version 0.07
=cut
=head1 SYNOPSIS
Quick summary of what the module does.
Perhaps a little code snippet.
use Acme::Hospital::Bed;
Acme::Hospital::Bed->start;
...
Acme::Hospital::Bed->new(
total_num_of_beds => 4,
lifes => 5,
names => [qw/tom richard joy/],
phrases => [
[
"Hello, I am fine.",
"I still have my mind.",
],
[
"Hello, I am still fine.",
"I still have my mind."
],
[
"Hello, I am also fine.",
"I still have my mind."
],
[
"Hello, I think I'm still fine.",
"I still have my mind."
],
[
"Hello, I think you think I'm fine.",
"I still have my mind."
],
[
"Hello, am I still fine.",
"I still have my mind",
],
[
"Hello, do you still think I'm fine.",
"I still have my mind",
],
[
"Hello, I don't feel so fine.",
"I still have my mind",
],
[
"Hello, you need to be secluded and watched 24 hours by big men",
"I still have my mind, they're just a bit small minded.",
],
[
"Hello, I'm still fine.",
"Waiting every 5 minutes... too easy for me but sorry for the rest?",
]
]
)->start;
Out of my control, trying to prevent mass Khaos via starting laughter on the bbc news.
=head1 DESCRIPTION
Acme::Hospital::Bed is a simple command line Q/A game.
The basic gameplay is the following:
A patient is generated with a random 'illness' level of 1 to 10 and a phrase that is associated to this level.
The player then decides y(yes) or n(no) to check the patient into a hospital bed.
If they guess correctly then the patient will be allocated a bed for the specified time, else the player will lose a life.
A correct guess is when the player decides yes and the patients level is greater than 5.
An incorrect guess is when the player decides yes and the patients level is lower than 5 or when the player decides no and the patients level is greater than 5.
During each turn, all rooms are deducted 1 nights stay. If a room reaches 0 then the patient is checked out and that room becomes available again.
=head1 METHODS
=head2 new
To instantiate a new Acme::Hospital::Bed object.
Acme::Hospital::Bed->new(
total_num_of_beds => 30,
lifes => 5,
names => [qw/tom richard harry/],
phrases => [
[
'Level 1 phrase'
],
[...],
[...],
[...],
[...],
[...],
[...],
[...],
[...],
[
'Level 10 phrase'
]
]
)
=head3 total_num_of_beds
Configure the total number of beds needed to win the game. The default is 20.
( run in 1.819 second using v1.01-cache-2.11-cpan-aadc1410aed )