| 1 | package Term::Chess::Watcher; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 6 | ▶ | use 5.014; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 6 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 6 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 6 | our $VERSION = '0.02'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 89 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 10 | 89 | my ($class, $budget) = @_; | |||||||||||||||||||
| 11 | 89 | return bless { budget => $budget }, $class; | |||||||||||||||||||
| 12 | } | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | ▶ | sub budget { $_[0]->{budget} } | ||||||||||||||||||
|
Subroutine
budget: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 557 | ▶ | sub check { | ||||||||||||||||||
|
Subroutine
check: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||
| 17 | 557 | my ($self, $tree) = @_; | |||||||||||||||||||
| 18 | 557 | ▶ | $tree->{stop_requested} = 1 if ($tree->{nodes} // 0) >= $self->{budget}; | ||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
$tree->{"nodes"} // 0
MC/DC100%1/1
$tree->{"nodes"} // 0
$tree->{"nodes"}
Truth table100%2/2
A
A= $tree->{"nodes"}
| |||||||||||||||||||||
| 19 | 557 | return; | |||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 6 | 1; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | __END__ | ||||||||||||||||||||