Plisco/Engine/LimitsType.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 2 totaltotal 50.0% 10 / 20 CC 2 SCAR 12.5
CC
2
Cov
62%
useTimeManagement
6.0
BEGIN
1.0
new
1.0
CRAP 3.5
« Plisco/Engine/TimeControl.pm ↑ Summary EMM-header.pm »
1 #! /bin/false
2  
3 # Copyright (C) 2021-2026 Guido Flohr <guido.flohr@cantanea.com>,
4 # all rights reserved.
5  
6 # This program is free software. It comes without any warranty, to
7 # the extent permitted by applicable law. You can redistribute it
8 # and/or modify it under the terms of the Do What the Fuck You Want
9 # to Public License, Version 2, as published by Sam Hocevar. See
10 # http://www.wtfpl.net/ for more details.
11  
12 # Make Dist::Zilla happy.
13 # ABSTRACT: Analyze chess games in PGN format
14  
15 package Chess::Plisco::Engine::LimitsType;
16 7 $Chess::Plisco::Engine::LimitsType::VERSION = 'v1.0.3';
17 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 354 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
20 354 my ($class) = @_;
21  
22 354 my $self = {
23 searchmoves => [],
24 time => [0, 0],
25 inc => [0, 0],
26 movetime => 0,
27 start_time => [0, 0],
28 movestogo => 0,
29 depth => 0,
30 mate => 0,
31 infinite => 0,
32 nodes => 0,
33 ponder => 0,
34 };
35  
36 354 bless $self, $class;
37 }
38  
39 0 ▶sub useTimeManagement {
Subroutine useTimeManagement: not called CC=2 SCAR=17.9
Pod undocumented
40 0 my ($self) = @_;
41  
42 0 ▶ return $self->{time}->[0] || $self->{time}->{1};
Condition0%0/3
$self->{'time'}[0] || $self->{'time'}{'1'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'time'}[0] || $self->{'time'}{'1'}
$self->{'time'}[0] $self->{'time'}{'1'}
Truth table0%0/3
A || B
A= $self->{'time'}[0]B= $self->{'time'}{'1'}
ABresult
1X1
011
000
43 }
44  
45 7 1;
« Plisco/Engine/TimeControl.pm ↑ Summary EMM-header.pm »