line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Game::WordBrain::Solution; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
405
|
use strict; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
147
|
|
4
|
7
|
|
|
7
|
|
22
|
use warnings; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
133
|
|
5
|
|
|
|
|
|
|
|
6
|
7
|
|
|
7
|
|
23
|
use Game::WordBrain::Word; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
386
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
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 there are multiple possible solutions. A solution is defined as an ordered collection of words ( ArrayRef of L ). |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
B 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 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
ArrayRef of Ls |
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 Ls, returns a Game::WordBrain::Solution. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub new { |
58
|
148
|
|
|
148
|
1
|
158
|
my $class = shift; |
59
|
148
|
|
|
|
|
107
|
my $args = shift; |
60
|
|
|
|
|
|
|
|
61
|
148
|
|
|
|
|
748
|
return bless $args, $class; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |