line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Game::WordBrain::Solution; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
383
|
use strict; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
131
|
|
4
|
6
|
|
|
6
|
|
19
|
use warnings; |
|
6
|
|
|
|
|
5
|
|
|
6
|
|
|
|
|
98
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
16
|
use Game::WordBrain::Word; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
347
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.2.1'; # 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
|
1
|
|
|
1
|
1
|
61
|
my $class = shift; |
59
|
1
|
|
|
|
|
2
|
my $args = shift; |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
|
|
6
|
return bless $args, $class; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |