| 1 | package Game::WordBrain::Solution; | ||
| 2 | |||
| 3 | 9 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 9 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 9 | ▶ | use Game::WordBrain::Word; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 9 | our $VERSION = '0.2.2'; # VERSION | |
| 9 | # ABSTRACT: Representation of Potential WordBrain Solution | ||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | Game::WordBrain::Solution - Representation of Potential WordBrain Solution | ||
| 14 | |||
| 15 | =head1 SYNOPSIS | ||
| 16 | |||
| 17 | my @words = ( | ||
| 18 | Game::WordBrain::Word->new( ... ), | ||
| 19 | Game::WordBrain::Word->new( ... ), | ||
| 20 | ... | ||
| 21 | ); | ||
| 22 | |||
| 23 | my $solution = Game::WordBrain::Solution->new({ | ||
| 24 | words => \@words, | ||
| 25 | }); | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | For any L<Game::WordBrain> there are multiple possible solutions. A solution is defined as an ordered collection of words ( ArrayRef of L<Game::WordBrain::Word> ). | ||
| 30 | |||
| 31 | B<NOTE> Each of these solutions is just a potential solution and may not be *THE* solution that WordBrain is looking for. The only way to know for sure is to try the solution. | ||
| 32 | |||
| 33 | =head1 ATTRIBUTES | ||
| 34 | |||
| 35 | =head2 B<words> | ||
| 36 | |||
| 37 | ArrayRef of L<Game::WordBrain::Word>s | ||
| 38 | |||
| 39 | =head1 METHODS | ||
| 40 | |||
| 41 | =head2 new | ||
| 42 | |||
| 43 | my @words = ( | ||
| 44 | Game::WordBrain::Word->new( ... ), | ||
| 45 | Game::WordBrain::Word->new( ... ), | ||
| 46 | ... | ||
| 47 | ); | ||
| 48 | |||
| 49 | my $solution = Game::WordBrain::Solution->new({ | ||
| 50 | words => \@words, | ||
| 51 | }); | ||
| 52 | |||
| 53 | Given an ArrayRef of L<Game::WordBrain::Word>s, returns a Game::WordBrain::Solution. | ||
| 54 | |||
| 55 | =cut | ||
| 56 | |||
| 57 | 148 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 58 | 148 | my $class = shift; | |
| 59 | 148 | my $args = shift; | |
| 60 | |||
| 61 | 148 | return bless $args, $class; | |
| 62 | } | ||
| 63 | |||
| 64 | 9 | 1; | |