|  line  | 
 stmt  | 
 bran  | 
 cond  | 
 sub  | 
 pod  | 
 time  | 
 code  | 
| 
1
 | 
  
 
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 package Games::Solitaire::Verify::Move;  | 
| 
2
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 $Games::Solitaire::Verify::Move::VERSION = '0.2403';  | 
| 
3
 | 
9
 | 
 
 | 
 
 | 
  
9
  
 | 
 
 | 
71379
 | 
 use warnings;  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
33
 | 
    | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
305
 | 
    | 
| 
4
 | 
9
 | 
 
 | 
 
 | 
  
9
  
 | 
 
 | 
48
 | 
 use strict;  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
19
 | 
    | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
193
 | 
    | 
| 
5
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
6
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
7
 | 
9
 | 
 
 | 
 
 | 
  
9
  
 | 
 
 | 
958
 | 
 use parent 'Games::Solitaire::Verify::Base';  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
639
 | 
    | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
43
 | 
    | 
| 
8
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
9
 | 
9
 | 
 
 | 
 
 | 
  
9
  
 | 
 
 | 
1460
 | 
 use Games::Solitaire::Verify::Exception ();  | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
22
 | 
    | 
| 
 
 | 
9
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5006
 | 
    | 
| 
10
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
11
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __PACKAGE__->mk_acc_ref(  | 
| 
12
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     [  | 
| 
13
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         qw(  | 
| 
14
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             source_type  | 
| 
15
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             dest_type  | 
| 
16
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             source  | 
| 
17
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             dest  | 
| 
18
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             num_cards  | 
| 
19
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             _game  | 
| 
20
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             )  | 
| 
21
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     ]  | 
| 
22
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 );  | 
| 
23
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
24
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
25
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _from_fcs_string  | 
| 
26
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
27
 | 
2551
 | 
 
 | 
 
 | 
  
2551
  
 | 
 
 | 
4794
 | 
     my ( $self, $str ) = @_;  | 
| 
28
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
29
 | 
2551
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
13813
 | 
     if ( $str =~ m{\AMove a card from stack (\d+) to the foundations\z} )  | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
 
 | 
 
 | 
  
100
  
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
30
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
31
 | 
659
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1656
 | 
         my $source = $1;  | 
| 
32
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
33
 | 
659
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1535
 | 
         $self->source_type("stack");  | 
| 
34
 | 
659
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1308
 | 
         $self->dest_type("foundation");  | 
| 
35
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
36
 | 
659
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2074
 | 
         $self->source($source);  | 
| 
37
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
38
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ( $str =~ m{\AMove a card from freecell (\d+) to the foundations\z} )  | 
| 
39
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
40
 | 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1630
 | 
         my $source = $1;  | 
| 
41
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
42
 | 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
285
 | 
         $self->source_type("freecell");  | 
| 
43
 | 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
269
 | 
         $self->dest_type("foundation");  | 
| 
44
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
45
 | 
116
 | 
 
 | 
 
 | 
 
 | 
 
 | 
376
 | 
         $self->source($source);  | 
| 
46
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
47
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ( $str =~ m{\AMove a card from freecell (\d+) to stack (\d+)\z} )  | 
| 
48
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
49
 | 
475
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1613
 | 
         my ( $source, $dest ) = ( $1, $2 );  | 
| 
50
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
51
 | 
475
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1153
 | 
         $self->source_type("freecell");  | 
| 
52
 | 
475
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1000
 | 
         $self->dest_type("stack");  | 
| 
53
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
54
 | 
475
 | 
 
 | 
 
 | 
 
 | 
 
 | 
931
 | 
         $self->source($source);  | 
| 
55
 | 
475
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1341
 | 
         $self->dest($dest);  | 
| 
56
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
57
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ( $str =~ m{\AMove a card from stack (\d+) to freecell (\d+)\z} )  | 
| 
58
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
59
 | 
591
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1935
 | 
         my ( $source, $dest ) = ( $1, $2 );  | 
| 
60
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
61
 | 
591
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1493
 | 
         $self->source_type("stack");  | 
| 
62
 | 
591
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1277
 | 
         $self->dest_type("freecell");  | 
| 
63
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
64
 | 
591
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1120
 | 
         $self->source($source);  | 
| 
65
 | 
591
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1764
 | 
         $self->dest($dest);  | 
| 
66
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
67
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ( $str =~ m{\AMove (\d+) cards from stack (\d+) to stack (\d+)\z} )  | 
| 
68
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
69
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2485
 | 
         my ( $num_cards, $source, $dest ) = ( $1, $2, $3 );  | 
| 
70
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
71
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1712
 | 
         $self->source_type("stack");  | 
| 
72
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1460
 | 
         $self->dest_type("stack");  | 
| 
73
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
74
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1341
 | 
         $self->source($source);  | 
| 
75
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
1308
 | 
         $self->dest($dest);  | 
| 
76
 | 
702
 | 
 
 | 
 
 | 
 
 | 
 
 | 
2092
 | 
         $self->num_cards($num_cards);  | 
| 
77
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
78
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     elsif ( $str =~  | 
| 
79
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
         m{\AMove the sequence on top of Stack (\d+) to the foundations\z} )  | 
| 
80
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
81
 | 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
24
 | 
         my $source = $1;  | 
| 
82
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
83
 | 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
21
 | 
         $self->source_type("stack_seq");  | 
| 
84
 | 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
19
 | 
         $self->dest_type("foundation");  | 
| 
85
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
86
 | 
7
 | 
 
 | 
 
 | 
 
 | 
 
 | 
25
 | 
         $self->source($source);  | 
| 
87
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
88
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     else  | 
| 
89
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
90
 | 
1
 | 
 
 | 
 
 | 
 
 | 
 
 | 
26
 | 
         Games::Solitaire::Verify::Exception::Parse::FCS->throw(  | 
| 
91
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
             error => "Cannot parse 'FCS' String", );  | 
| 
92
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
93
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
94
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
95
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 sub _init  | 
| 
96
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 {  | 
| 
97
 | 
2551
 | 
 
 | 
 
 | 
  
2551
  
 | 
 
 | 
4642
 | 
     my ( $self, $args ) = @_;  | 
| 
98
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
99
 | 
2551
 | 
 
 | 
 
 | 
 
 | 
 
 | 
6249
 | 
     $self->_game( $args->{game} );  | 
| 
100
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
101
 | 
2551
 | 
  
 50
  
 | 
 
 | 
 
 | 
 
 | 
5879
 | 
     if ( exists( $args->{fcs_string} ) )  | 
| 
102
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     {  | 
| 
103
 | 
2551
 | 
 
 | 
 
 | 
 
 | 
 
 | 
5271
 | 
         return $self->_from_fcs_string( $args->{fcs_string} );  | 
| 
104
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     }  | 
| 
105
 | 
0
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
     return ();  | 
| 
106
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 }  | 
| 
107
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
108
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
109
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 1;    # End of Games::Solitaire::Verify::Move  | 
| 
110
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
    | 
| 
111
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 
 | 
 __END__  |