File Coverage

blib/lib/Games/Solitaire/BlackHole/Solver/App.pm
Criterion Covered Total %
statement 5 22 22.7
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 8 30 26.6


line stmt bran cond sub pod time code
1             package Games::Solitaire::BlackHole::Solver::App;
2             $Games::Solitaire::BlackHole::Solver::App::VERSION = '0.4.1';
3 1     1   1055 use 5.014;
  1         4  
4 1     1   611 use Moo;
  1         12152  
  1         5  
5              
6             extends('Games::Solitaire::BlackHole::Solver::App::Base');
7              
8              
9             sub run
10             {
11 0     0 1   my $self = shift;
12 0           my $RANK_KING = $self->_RANK_KING;
13              
14 0           $self->_process_cmd_line(
15             {
16             extra_flags => {}
17             }
18             );
19              
20 0           $self->_set_up_solver( 0, [ 1, $RANK_KING ] );
21              
22 0           my $verdict = 0;
23              
24 0           $self->_next_task;
25              
26             QUEUE_LOOP:
27 0           while ( my $state = $self->_get_next_state_wrapper )
28             {
29             # The foundation
30 0           my $no_cards = 1;
31              
32 0           my @_pending;
33              
34 0           if (1)
35             {
36 0           $self->_find_moves( \@_pending, $state, \$no_cards );
37             }
38              
39 0 0         if ($no_cards)
40             {
41 0           $self->_trace_solution( $state, );
42 0           $verdict = 1;
43 0           last QUEUE_LOOP;
44             }
45             last QUEUE_LOOP
46 0 0         if not $self->_process_pending_items( \@_pending, $state );
47             }
48              
49 0           return $self->_my_exit( $verdict, );
50             }
51              
52              
53             1;
54              
55             __END__