view release on metacpan or search on metacpan
lib/App/ForKids/LogicalPuzzleGenerator/Fact/NotTrue.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
$$this{value} = 0;
return $this;
}
=head1 AUTHOR
Pawel Biernacki, C<< <pawel.f.biernacki at gmail> >>
=head1 BUGS
lib/App/ForKids/LogicalPuzzleGenerator/Fact/True.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
$$this{value} = 1;
return $this;
}
=head1 AUTHOR
Pawel Biernacki, C<< <pawel.f.biernacki at gmail> >>
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Animal.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the pets
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $pets[int(rand()*@pets)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Color.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the colors
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $colors[int(rand()*@colors)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Fruit.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the fruits
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $fruits[int(rand()*@fruits)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Name.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the names
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $names[int(rand()*@names)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Profession.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the professions
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $professions[int(rand()*@professions)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;
lib/App/ForKids/LogicalPuzzleGenerator/Variable/Race.pm view on Meta::CPAN
=head1 SUBROUTINES/METHODS
=head2 new
=cut
sub new
{
my $class = shift;
my $this = $class->SUPER::new(@_);
# select the races
for my $i (0..$$this{amount_of_values}-1)
{
while (1)
{
my $value = $races[int(rand()*@races)];
if (!grep {$_ eq $value } @{$$this{selected_values}})
{
push @{$$this{selected_values}}, $value;