Branch Coverage

blib/lib/Games/2048/Game.pm
Criterion Covered Total %
branch 16 28 57.1


line true false branch
25 10 20 unless @available_cells
27 20 0 rand() < 0.9 ? :
47 60 340 if ($self->cells_can_merge($cell, $next)) { }
102 238 elsif (not $self->tile($farthest)) { }
68 60 0 if $self->score > $self->best_score
69 0 60 if ($merged_tile->value >= 2048 and not $self->won)
94 0 0 if ($self->move_tiles($vec))
103 0 0 if (not $self->has_moves_remaining)
113 288 185 if $tile and $next_tile and not $next_tile->merged
118 3 3 if $self->has_available_cells
122 1 72 if $self->cells_can_merge($cell, $next)
130 0 0 $^O eq 'MSWin32' ? :
133 0 0 unless defined $dir
150 1 0 if defined $self->version