blib/lib/Game/RoyalUr/Move.pm

filter: Statementstmt 81.8% 9 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 86.6% 13 / 15 CC 1 SCAR 0.7
CC
1
Cov
82%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« bin/royalur ↑ Summary blib/lib/Game/RoyalUr/Bot.pm »
1 package Game::RoyalUr::Move;
2  
3 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶use Object::Proto::Sugar;
Subroutine BEGIN: called CC=1 SCAR=2.6
8  
9 our $VERSION = '0.03';
10  
11 has side => (is => 'ro');
12  
13 has roll => (is => 'ro');
14  
15 has from => (is => 'ro');
16  
17 has to => (is => 'ro');
18  
19 has from_step => (is => 'ro');
20  
21 has to_step => (is => 'ro');
22  
23 has from_cell => (is => 'ro');
24  
25 has to_cell => (is => 'ro');
26  
27 has captures => (is => 'ro', default => 0);
28  
29 has rosette => (is => 'ro', default => 0);
30  
31 has home => (is => 'ro', default => 0);
32  
33 sub trace {
34 my ($self) = @_;
35 return $self->from_step . '>' . $self->to_step
36 . ($self->captures ? 'x' : '')
37 . ($self->rosette ? '*' : '');
38 }
39  
40 1;
41  
42 __END__
« bin/royalur ↑ Summary blib/lib/Game/RoyalUr/Bot.pm »