blib/lib/Game/Floppy/Terminal.pm

filter: Statementstmt 94.9% 356 / 375 Branchbran 85.1% 177 / 208 Conditioncond 76.0% 70 / 92 MC/DCmcdc 54.0% 27 / 50 Subroutinesub 100% 55 / 55 Podpod 94.7% 18 / 19 totaltotal 87.9% 703 / 799 CC 143 SCAR 25.6
CC
143
Cov
89%
run
32.3
BUILD
24.7
board_lines
21.1
CRAP 12.9
« blib/lib/Game/Floppy/Raylib.pm ↑ Summary blib/lib/Game/Floppy.pm »
1 package Game::Floppy::Terminal;
2  
3 7 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 7 ▶use Digest::SHA ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use Getopt::Long ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 7 ▶use Object::Proto::Sugar -types;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 7 ▶use Game::Floppy;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 7 ▶use Game::Floppy::Bot;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 7 ▶use Game::Terminal::Kit::Keys;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 7 ▶use Game::Terminal::Kit::Run;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 7 ▶use Game::Terminal::Kit::Screen;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 7 ▶use Game::Terminal::Kit::Ticker;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 7 our $VERSION = '0.10';
20  
21 7 my %GLYPH = (
22 wide => {
23 pipe => "\xE2\x96\x88",
24 top => "\xE2\x96\x80",
25 bottom => "\xE2\x96\x84",
26 bird => "\xE2\x97\x8F",
27 centre => "\xE2\x97\x89",
28 sky => ' ',
29 h => "\xE2\x94\x80", v => "\xE2\x94\x82",
30 tl => "\xE2\x95\xAD", tr => "\xE2\x95\xAE", bl => "\xE2\x95\xB0", br => "\xE2\x95\xAF",
31 },
32 ascii => {
33 pipe => '#',
34 top => '=',
35 bottom => '=',
36 bird => 'o',
37 centre => '@',
38 sky => ' ',
39 h => '-', v => '|',
40 tl => '+', tr => '+', bl => '+', br => '+',
41 },
42 );
43  
44 7 my %SGR = (
45 pipe => '32',
46 top => '32',
47 bottom => '32',
48 bird => '1;36',
49 centre => '1;36',
50 frame => '2',
51 status => '1',
52 paused => '1;33',
53 over => '1;31',
54 legend => '2',
55 );
56  
57 7 my %FLAP = map { $_ => 1 } ' ', 'up', 'enter', 'w', 'k';
58  
59  
60 7 my ($MIN_ROWS, $MAX_ROWS) = (10, 25);
61  
62 has in => (
63 is => 'rw',
64 isa => Any,
65 7 ▶ default => sub { \*STDIN }
Subroutine __ANON__: called CC=1 SCAR=0.0
66 7 );
67  
68 has out => (
69 is => 'rw',
70 isa => Any,
71 7 ▶ default => sub { \*STDOUT }
Subroutine __ANON__: called CC=1 SCAR=0.0
72 7 );
73  
74 7 has cols => (is => 'ro');
75 7 has rows => (is => 'ro');
76  
77 has seed => (
78 is => 'ro',
79 isa => Str,
80 default => ''
81 7 );
82  
83 has level => (
84 is => 'ro',
85 isa => Int,
86 default => 3
87 7 );
88  
89 has watch => (
90 is => 'ro',
91 isa => Int,
92 default => 0
93 7 );
94  
95 has quiet => (
96 is => 'ro',
97 isa => Int,
98 default => 0
99 7 );
100  
101 has ascii => (
102 is => 'ro',
103 isa => Int,
104 default => 0
105 7 );
106  
107 has max_ticks => (
108 is => 'ro',
109 isa => Int,
110 default => 0
111 7 );
112  
113 has game => (
114 is => 'rw',
115 isa => Object
116 7 );
117  
118 has [qw/keyboard screen/] => (
119 is => 'rw'
120 7 );
121  
122 7 has keysource => (is => 'rw');
123  
124 has pending => (
125 is => 'rw',
126 isa => ArrayRef,
127 42 ▶ default => sub { [] }
Subroutine __ANON__: called CC=1 SCAR=0.0
128 7 );
129  
130 has clock => (
131 is => 'ro',
132 isa => Any,
133 7 ▶ default => sub { \&Time::HiRes::time }
Subroutine __ANON__: called CC=1 SCAR=0.0
134 7 );
135  
136 has sleeper => (
137 is => 'ro',
138 isa => Any,
139 7 ▶ default => sub { sub { select undef, undef, undef, $_[0] } }
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
140 7 );
141  
142 has ticker => (
143 is => 'rw',
144 isa => Object
145 7 );
146  
147 7 has columns => (is => 'rw');
148 7 has lines => (is => 'rw');
149  
150 has frames => (
151 is => 'rw',
152 isa => Int,
153 default => 0
154 7 );
155  
156 has refused => (
157 is => 'rw',
158 isa => Int,
159 default => 0
160 7 );
161  
162 has games => (
163 is => 'rw',
164 isa => Int,
165 default => 0
166 7 );
167  
168 has best => (
169 is => 'rw',
170 isa => Int,
171 default => 0
172 7 );
173  
174 has stopped => (
175 is => 'rw',
176 isa => Str,
177 default => ''
178 7 );
179  
180 has refusal => (
181 is => 'rw',
182 isa => Str,
183 default => ''
184 7 );
185  
186 has _wants_ansi => (
187 is => 'ro',
188 init_arg => 'ansi',
189 private => 1
190 7 );
191  
192 has _wants_interactive => (
193 is => 'ro',
194 init_arg => 'interactive',
195 private => 1
196 7 );
197  
198 7 has _view_cols => (is => 'rw', private => 1);
199 7 has _view_rows => (is => 'rw', private => 1);
200  
201 6 ▶my $clamp = sub {
Subroutine __ANON__: called CC=3 SCAR=11.0
202 6 my ($value, $low, $high) = @_;
203 6 ▶ return $low if $value < $low;
Branch: 1 branch
BranchTrueFalseTotal
if $value < $low 2 4 6
204 4 ▶ return $high if $value > $high;
Branch: 1 branch
BranchTrueFalseTotal
if $value > $high 1 3 4
205 3 return $value;
206 7 };
207  
208 11 ▶my $cols_for = sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
209 11 my ($game, $rows) = @_;
210 11 return int($rows * $game->width / $game->height * 2 + 0.5);
211 7 };
212  
213 42 ▶sub BUILD {
Subroutine BUILD: called CC=24 SCAR=32.1
Pod undocumented
214 42 my ($self) = @_;
215  
216 42 Game::Floppy::Bot->describe($self->level);
217  
218 40 for my $name (qw/ cols rows columns lines max_ticks /) {
219 196 my $value = $self->$name;
220 196 ▶ next unless defined $value;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value 85 111 196
221 111 ▶ Carp::croak("Game::Floppy::Terminal: $name must be a whole number, not '$value'")
Branch: 1 branch
BranchTrueFalseTotal
unless $value =~ /\A[0-9]+\z/u 1 110 111
222 unless $value =~ /\A[0-9]+\z/;
223 }
224  
225 39 ▶ $self->stopped('') unless defined $self->stopped;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->stopped 39 0 39
226 39 ▶ $self->refusal('') unless defined $self->refusal;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->refusal 39 0 39
227  
228 39 ▶ Carp::croak('Game::Floppy::Terminal: the clock is a code reference')
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self->clock eq "CODE" 1 38 39
229 unless ref $self->clock eq 'CODE';
230 38 ▶ Carp::croak('Game::Floppy::Terminal: the sleeper is a code reference')
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self->sleeper eq "CODE" 0 38 38
231 unless ref $self->sleeper eq 'CODE';
232  
233 38 ▶ $self->keyboard(Game::Terminal::Kit::Keys->new(
Branch: 2 branches
BranchTrueFalseTotal
unless $self->keyboard 38 0 38
$self->keysource ? : 28 10 38
234 in => $self->in,
235 pending => $self->pending,
236 sleeper => $self->sleeper,
237 ($self->keysource ? (keysource => $self->keysource) : ()),
238 )) unless $self->keyboard;
239 38 ▶ $self->screen(Game::Terminal::Kit::Screen->new(
Branch: 2 branches
BranchTrueFalseTotal
unless $self->screen 38 0 38
$self->ascii ? : 32 6 38
240 out => $self->out,
241 interactive => $self->interactive,
242 colour => $self->ansi,
243 ascii => $self->ascii ? 1 : 0,
244 )) unless $self->screen;
245  
246 38 ▶ unless ($self->game) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->game) 38 0 38
247 38 my $seed = $self->seed;
248 38 ▶ $seed = Digest::SHA::sha256_hex(join ':', $self->clock->(), $$)
Branch: 1 branch
BranchTrueFalseTotal
unless length $seed 3 35 38
249 unless CORE::length $seed;
250 38 $self->game(Game::Floppy->new(seed => $seed));
251 }
252  
253 38 my ($w, $h) = $self->_measure;
254 38 ▶ my $rows = defined $self->rows ? $self->rows
Branch: 2 branches
BranchTrueFalseTotal
defined $self->rows ? : 30 8 38
$h ? : 4 4 8
255 : $h ? $clamp->($h - 5, $MIN_ROWS, $MAX_ROWS) : 20;
256 38 ▶ my $cols = defined $self->cols ? $self->cols : $cols_for->($self->game, $rows);
Branch: 1 branch
BranchTrueFalseTotal
defined $self->cols ? : 29 9 38
257 38 ▶ if (!defined $self->cols && !defined $self->rows && $w && $cols + 2 > $w) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $self->cols || defined $self->rows and $w and $cols + 2 > $w) 2 36 38
Condition100%9/9
not defined $self->cols || defined $self->rows and $w and $cols + 2 > $w
!ll&&!rl&&r
3422
not defined $self->cols || defined $self->rows and $w
!ll&&!rl&&r
3044
defined $self->cols || defined $self->rows
l!l&&r!l&&!r
2918
MC/DC100%4/4
not defined $self->cols || defined $self->rows and $w and $cols + 2 > $w
defined $self->cols defined $self->rows $w $cols + 2 > $w
Truth table100%5/5
not(A || B) and C and D
A= defined $self->colsB= defined $self->rowsC= $wD= $cols + 2 > $w
ABCDresult
1XXX0
01XX0
000X0
00100
00111
258 2 $rows = $clamp->(int(($w - 2) / ($self->game->width / $self->game->height * 2)), $MIN_ROWS, $MAX_ROWS);
259 2 $cols = $cols_for->($self->game, $rows);
260 }
261 38 ▶ Carp::croak('Game::Floppy::Terminal: a view is at least 10 by 10')
Branch: 1 branch
BranchTrueFalseTotal
if $cols < 10 or $rows < 10 2 36 38
Condition66%2/3
$cols < 10 or $rows < 10
l!l&&r!l&&!r
0236
MC/DC50%1/2
$cols < 10 or $rows < 10
$cols < 10 $rows < 10
Truth table66%2/3
A or B
A= $cols < 10B= $rows < 10
ABresult
1X1
011
000
262 if $cols < 10 || $rows < 10;
263 36 $self->_view_cols($cols);
264 36 $self->_view_rows($rows);
265  
266 36 ▶ $self->ticker(Game::Terminal::Kit::Ticker->new(clock => $self->clock)) unless $self->ticker;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->ticker 36 0 36
267  
268 36 return;
269 }
270  
271 3696 ▶sub view { my ($self) = @_; return ($self->_view_cols, $self->_view_rows) }
Subroutine view: called CC=1 SCAR=0.0
Pod documented
272  
273 149122 ▶sub ansi {
Subroutine ansi: called CC=6 SCAR=18.1
Pod documented
274 149122 my ($self) = @_;
275 149122 ▶ return 0 if defined $ENV{NO_COLOR} && CORE::length $ENV{NO_COLOR};
Branch: 1 branch
BranchTrueFalseTotal
if defined $ENV{"NO_COLOR"} and length $ENV{"NO_COLOR"} 11 149111 149122
Condition66%2/3
defined $ENV{"NO_COLOR"} and length $ENV{"NO_COLOR"}
!ll&&!rl&&r
149111011
MC/DC50%1/2
defined $ENV{"NO_COLOR"} and length $ENV{"NO_COLOR"}
defined $ENV{"NO_COLOR"} length $ENV{"NO_COLOR"}
Truth table66%2/3
A and B
A= defined $ENV{"NO_COLOR"}B= length $ENV{"NO_COLOR"}
ABresult
0X0
100
111
276 149111 ▶ return $self->_wants_ansi ? 1 : 0 if defined $self->_wants_ansi;
Branch: 2 branches
BranchTrueFalseTotal
if defined $self->_wants_ansi 149104 7 149111
$self->_wants_ansi ? : 35 149069 149104
277 7 ▶ return -t $self->out ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
-t $self->out ? : 0 7 7
278 }
279  
280 152854 ▶sub interactive {
Subroutine interactive: called CC=4 SCAR=14.3
Pod documented
281 152854 my ($self) = @_;
282 152854 ▶ return $self->_wants_interactive ? 1 : 0 if defined $self->_wants_interactive;
Branch: 2 branches
BranchTrueFalseTotal
if defined $self->_wants_interactive 152795 59 152854
$self->_wants_interactive ? : 0 152795 152795
283 59 ▶ return -t $self->out ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
-t $self->out ? : 0 59 59
284 }
285  
286 149084 ▶sub _synced {
Subroutine _synced: called CC=1 SCAR=0.0
287 149084 my ($self) = @_;
288 149084 my $screen = $self->screen;
289 149084 $screen->out($self->out);
290 149084 $screen->interactive($self->interactive);
291 149084 $screen->colour($self->ansi);
292 149084 return $screen;
293 }
294  
295 1 ▶sub raw {
Subroutine raw: called CC=1 SCAR=0.0
Pod documented
296 1 my ($self) = @_;
297 1 return $self->keyboard->raw;
298 }
299  
300 2 ▶sub keys_available {
Subroutine keys_available: called CC=1 SCAR=0.0
Pod documented
301 2 my ($self) = @_;
302 2 return $self->keyboard->keys_available;
303 }
304  
305 29 ▶sub enter_raw {
Subroutine enter_raw: called CC=2 SCAR=6.9
Pod documented
306 29 my ($self) = @_;
307 29 ▶ return $self->keyboard->enter_raw ? $self : undef;
Branch: 1 branch
BranchTrueFalseTotal
$self->keyboard->enter_raw ? : 20 9 29
308 }
309  
310 31 ▶sub leave_raw {
Subroutine leave_raw: called CC=1 SCAR=0.0
Pod documented
311 31 my ($self) = @_;
312 31 $self->screen->restore;
313 31 $self->keyboard->leave_raw;
314 31 return $self;
315 }
316  
317 3755 ▶sub read_key {
Subroutine read_key: called CC=1 SCAR=0.0
Pod documented
318 3755 my ($self, $wait) = @_;
319 3755 return $self->keyboard->read_key($wait);
320 }
321  
322 4 ▶sub cannot_play {
Subroutine cannot_play: called CC=1 SCAR=0.0
Pod documented
323 4 return 'A real-time game needs a terminal and Term::ReadKey to read the keys.'
324 . ' Install Term::ReadKey, or run floppy --watch to watch the bot play.';
325 }
326  
327 70 ▶sub _measure {
Subroutine _measure: called CC=5 SCAR=19.4
328 70 my ($self) = @_;
329 70 ▶ return ($self->columns, $self->lines) if defined $self->columns;
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->columns 8 62 70
330 62 ▶ return () if $self->keysource || !$self->interactive;
Branch: 1 branch
BranchTrueFalseTotal
if $self->keysource or not $self->interactive 62 0 62
Condition66%2/3
$self->keysource or not $self->interactive
l!l&&r!l&&!r
43190
MC/DC0%0/2
$self->keysource or not $self->interactive
$self->keysource not $self->interactive
Truth table66%2/3
A or not(B)
A= $self->keysourceB= not $self->interactive
ABresult
1X1
011
000
331 0 my ($w, $h) = $self->_synced->measured;
332 0 ▶ return $w ? ($w, $h) : ();
Branch: 1 branch
BranchTrueFalseTotal
$w ? : 0 0 0
333 }
334  
335 32 ▶sub too_narrow {
Subroutine too_narrow: called CC=6 SCAR=18.0
Pod documented
336 32 my ($self) = @_;
337 32 my ($w, $h) = $self->_measure;
338 32 ▶ return undef unless $w;
Branch: 1 branch
BranchTrueFalseTotal
unless $w 29 3 32
339 3 my ($cols, $rows) = $self->view;
340 3 my ($need_w, $need_h) = ($cols + 2, $rows + 5);
341 3 ▶ return undef if $w >= $need_w && (!$h || $h >= $need_h);
Branch: 1 branch
BranchTrueFalseTotal
if $w >= $need_w and !$h || $h >= $need_h 1 2 3
Condition83%5/6
$w >= $need_w and !$h || $h >= $need_h
!ll&&!rl&&r
111
not $h or $h >= $need_h
l!l&&r!l&&!r
011
MC/DC66%2/3
$w >= $need_w and !$h || $h >= $need_h
$w >= $need_w not $h $h >= $need_h
Truth table75%3/4
A and not(B) or C
A= $w >= $need_wB= not $hC= $h >= $need_h
ABCresult
0XX0
1000
11X1
1011
342 2 ▶ return sprintf 'This window is %d columns by %d lines, and a view %d by %d needs %d by %d.'
Condition50%1/2
$h || 0
l!l
20
MC/DC0%0/1
$h || 0
$h
Truth table50%1/2
A
A= $h
Aresult
11
00
343 . ' Widen it, or ask for a smaller view with --cols and --rows.',
344 $w, ($h || 0), $cols, $rows, $need_w, $need_h;
345 }
346  
347 3688 ▶sub _glyphs { return $GLYPH{ $_[0]->ascii ? 'ascii' : 'wide' } }
Subroutine _glyphs: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[0]->ascii ? : 3687 1 3688
348  
349 1166100 ▶sub _paint {
Subroutine _paint: called CC=3 SCAR=11.0
350 1166100 my ($self, $text, $key) = @_;
351 1166100 ▶ return $text unless defined $key && defined $SGR{$key};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $key and defined $SGR{$key} 1020729 145371 1166100
Condition66%2/3
defined $key and defined $SGR{$key}
!ll&&!rl&&r
10207290145371
MC/DC50%1/2
defined $key and defined $SGR{$key}
defined $key defined $SGR{$key}
Truth table66%2/3
A and B
A= defined $keyB= defined $SGR{$key}
ABresult
0X0
100
111
352 145371 return $self->_synced->paint($text, $SGR{$key});
353 }
354  
355 26 ▶sub _say {
Subroutine _say: called CC=2 SCAR=7.1
356 26 my ($self, @lines) = @_;
357 26 ▶ $self->_synced->say(@lines) if @lines;
Branch: 1 branch
BranchTrueFalseTotal
if @lines 26 0 26
358 26 return;
359 }
360  
361 3687 ▶sub status_line {
Subroutine status_line: called CC=5 SCAR=16.1
Pod documented
362 3687 my ($self, $note) = @_;
363 3687 my $game = $self->game;
364 3687 my $line = sprintf ' Floppy score %d best %d', $game->score, $self->best;
365 3687 $line = $self->_paint($line, 'status');
366 3687 ▶ if (defined $note && CORE::length $note) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $note and length $note) 22 3665 3687
Condition66%2/3
defined $note and length $note
!ll&&!rl&&r
3665022
MC/DC50%1/2
defined $note and length $note
defined $note length $note
Truth table66%2/3
A and B
A= defined $noteB= length $note
ABresult
0X0
100
111
367 22 ▶ my $key = $note eq 'paused' ? 'paused' : $note =~ /\AGame over/ ? 'over' : 'legend';
Branch: 2 branches
BranchTrueFalseTotal
$note eq 'paused' ? : 3 19 22
$note =~ /\AGame over/u ? : 4 15 19
368 22 $line .= ' ' . $self->_paint($note, $key);
369 }
370 3687 return $line;
371 }
372  
373 3687 ▶sub legend {
Subroutine legend: called CC=4 SCAR=13.9
Pod documented
374 3687 my ($self, $mode) = @_;
375 3687 ▶ $mode = '' unless defined $mode;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $mode 3683 4 3687
376 3687 ▶ my $text = $self->watch
Branch: 2 branches
BranchTrueFalseTotal
$self->watch ? : 3487 200 3687
$mode eq 'again' ? : 2 198 200
377 ? ' watching level ' . $self->level . ': q quits, p pauses'
378 : $mode eq 'again' ? ' space plays again; q quits'
379 : ' space, up, enter, w or k flap; p pauses; q quits';
380 3687 return $self->_paint($text, 'legend');
381 }
382  
383 3688 ▶sub board_lines {
Subroutine board_lines: called CC=21 SCAR=30.5
Pod documented
384 3688 my ($self) = @_;
385 3688 my $game = $self->game;
386 3688 my $g = $self->_glyphs;
387 3688 my ($cols, $rows) = $self->view;
388 3688 my ($width, $height) = ($game->width, $game->height);
389 3688 my $ppc = $width / $cols;
390 3688 my $ppr = $height / $rows;
391  
392 3688 my @cell = map { [ ('sky') x $cols ] } 1 .. $rows;
393  
394 3688 for my $tube (@{ $game->tubes }) {
395 4941 my $from = int($tube->{x} / $ppc);
396 4941 my $to = int(($tube->{x} + $game->tube_width - 1) / $ppc);
397 4941 for my $c ($from .. $to) {
398 18142 ▶ next if $c < 0 || $c >= $cols;
Branch: 1 branch
BranchTrueFalseTotal
if $c < 0 or $c >= $cols 1135 17007 18142
Condition66%2/3
$c < 0 or $c >= $cols
l!l&&r!l&&!r
0113517007
MC/DC50%1/2
$c < 0 or $c >= $cols
$c < 0 $c >= $cols
Truth table66%2/3
A or B
A= $c < 0B= $c >= $cols
ABresult
1X1
011
000
399 17007 for my $r (0 .. $rows - 1) {
400 180260 my ($y0, $y1) = ($r * $ppr, ($r + 1) * $ppr);
401 180260 ▶ if ($y1 <= $tube->{gap_top}) {
Branch: 4 branches
BranchTrueFalseTotal
if ($y1 <= $tube->{'gap_top'}) { } 60449 119811 180260
elsif ($y0 < $tube->{'gap_top'} and $tube->{'gap_top'} - $y0 >= $ppr / 2) { } 6972 112839 119811
elsif ($y0 >= $tube->{'gap_bottom'}) { } 43577 69262 112839
elsif ($y1 > $tube->{'gap_bottom'} and $y1 - $tube->{'gap_bottom'} >= $ppr / 2) { } 6359 117184 123543
402 60449 $cell[$r][$c] = 'pipe';
403 }
404 ▶ elsif ($y0 < $tube->{gap_top} && $tube->{gap_top} - $y0 >= $ppr / 2) {
Condition100%3/3
$y0 < $tube->{"gap_top"} and $tube->{"gap_top"} - $y0 >= $ppr / 2
!ll&&!rl&&r
10390489356972
MC/DC100%2/2
$y0 < $tube->{"gap_top"} and $tube->{"gap_top"} - $y0 >= $ppr / 2
$y0 < $tube->{"gap_top"} $tube->{"gap_top"} - $y0 >= $ppr / 2
Truth table100%3/3
A and B
A= $y0 < $tube->{"gap_top"}B= $tube->{"gap_top"} - $y0 >= $ppr / 2
ABresult
0X0
100
111
405 6972 $cell[$r][$c] = 'top';
406 }
407 elsif ($y0 >= $tube->{gap_bottom}) {
408 43577 $cell[$r][$c] = 'pipe';
409 }
410 ▶ elsif ($y1 > $tube->{gap_bottom} && $y1 - $tube->{gap_bottom} >= $ppr / 2) {
Condition100%3/3
$y1 > $tube->{"gap_bottom"} and $y1 - $tube->{"gap_bottom"} >= $ppr / 2
!ll&&!rl&&r
5428186226359
MC/DC100%2/2
$y1 > $tube->{"gap_bottom"} and $y1 - $tube->{"gap_bottom"} >= $ppr / 2
$y1 > $tube->{"gap_bottom"} $y1 - $tube->{"gap_bottom"} >= $ppr / 2
Truth table100%3/3
A and B
A= $y1 > $tube->{"gap_bottom"}B= $y1 - $tube->{"gap_bottom"} >= $ppr / 2
ABresult
0X0
100
111
411 6359 $cell[$r][$c] = 'bottom';
412 }
413 }
414 }
415 }
416  
417 3688 my $bird = $game->bird;
418 3688 my $r2 = $bird->{radius} ** 2;
419 3688 for my $r (0 .. $rows - 1) {
420 39300 for my $c (0 .. $cols - 1) {
421 1147640 my $dx = ($c + 0.5) * $ppc - $bird->{x};
422 1147640 my $dy = ($r + 0.5) * $ppr - $bird->{y};
423 1147640 ▶ $cell[$r][$c] = 'bird' if $dx * $dx + $dy * $dy <= $r2;
Branch: 1 branch
BranchTrueFalseTotal
if $dx * $dx + $dy * $dy <= $r2 9554 1138086 1147640
424 }
425 }
426 3688 my ($bc, $br) = (int($bird->{x} / $ppc), int($bird->{y} / $ppr));
427 3688 ▶ $cell[$br][$bc] = 'centre' if $br >= 0 && $br < $rows && $bc >= 0 && $bc < $cols;
Branch: 1 branch
BranchTrueFalseTotal
if $br >= 0 and $br < $rows and $bc >= 0 and $bc < $cols 3686 2 3688
Condition66%6/9
$br >= 0 and $br < $rows and $bc >= 0 and $bc < $cols
!ll&&!rl&&r
203686
$br >= 0 and $br < $rows and $bc >= 0
!ll&&!rl&&r
203686
$br >= 0 and $br < $rows
!ll&&!rl&&r
023686
MC/DC25%1/4
$br >= 0 and $br < $rows and $bc >= 0 and $bc < $cols
$br >= 0 $br < $rows $bc >= 0 $bc < $cols
Truth table40%2/5
A and B and C and D
A= $br >= 0B= $br < $rowsC= $bc >= 0D= $bc < $cols
ABCDresult
0XXX0
10XX0
110X0
11100
11111
428  
429 3688 my $v = $self->_paint($g->{v}, 'frame');
430 3688 my @lines = ($self->_paint($g->{tl} . ($g->{h} x $cols) . $g->{tr}, 'frame'));
431 3688 for my $r (0 .. $rows - 1) {
432 39300 ▶ push @lines, $v . join('', map { my $k = $cell[$r][$_]; $self->_paint($g->{$k}, $k eq 'sky' ? undef : $k) } 0 .. $cols - 1) . $v;
Branch: 1 branch
BranchTrueFalseTotal
$k eq 'sky' ? : 1020729 126911 1147640
433 }
434 3688 push @lines, $self->_paint($g->{bl} . ($g->{h} x $cols) . $g->{br}, 'frame');
435 3688 return @lines;
436 }
437  
438 3687 ▶sub frame_lines {
Subroutine frame_lines: called CC=1 SCAR=0.0
Pod documented
439 3687 my ($self, $note, $mode) = @_;
440 3687 return ($self->status_line($note), $self->board_lines, $self->legend($mode));
441 }
442  
443 3725 ▶sub _frame {
Subroutine _frame: called CC=3 SCAR=11.0
444 3725 my ($self, $note, $mode) = @_;
445 3725 ▶ return if $self->quiet;
Branch: 1 branch
BranchTrueFalseTotal
if $self->quiet 38 3687 3725
446 3687 $self->frames($self->frames + 1);
447 3687 my @lines = $self->frame_lines($note, $mode);
448 3687 my $screen = $self->_synced->flush_on;
449 3687 $screen->show(\@lines);
450 3687 ▶ $screen->say('') unless $self->interactive;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->interactive 3687 0 3687
451 3687 return;
452 }
453  
454 26 ▶sub _intro {
Subroutine _intro: called CC=3 SCAR=15.1
455 26 my ($self) = @_;
456 26 ▶ return unless $self->interactive && !$self->quiet;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->interactive and not $self->quiet 26 0 26
Condition33%1/3
$self->interactive and not $self->quiet
!ll&&!rl&&r
2600
MC/DC0%0/2
$self->interactive and not $self->quiet
$self->interactive not $self->quiet
Truth table33%1/3
A and not(B)
A= $self->interactiveB= not $self->quiet
ABresult
0X0
100
111
457 0 $self->_synced->flush_on->clear->hide_cursor;
458 0 return;
459 }
460  
461 3511 ▶sub _bot_turn {
Subroutine _bot_turn: called CC=2 SCAR=6.9
462 3511 my ($self) = @_;
463 3511 my $game = $self->game;
464 3511 ▶ $game->flap if Game::Floppy::Bot->choose($game, level => $self->level);
Branch: 1 branch
BranchTrueFalseTotal
if "Game::Floppy::Bot"->choose($game, "level", $self->level) 342 3169 3511
465 3511 return;
466 }
467  
468 39 ▶sub _on_key {
Subroutine _on_key: called CC=9 SCAR=22.0
469 39 my ($self, $key) = @_;
470 39 ▶ return 0 if !defined $key || $key eq 'q' || $key eq 'eof' || $key eq 'interrupt';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt" 16 23 39
Condition77%7/9
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
l!l&&r!l&&!r
16023
not defined $key or $key eq "q" or $key eq "eof"
l!l&&r!l&&!r
16023
not defined $key or $key eq "q"
l!l&&r!l&&!r
11523
MC/DC50%2/4
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
not defined $key $key eq "q" $key eq "eof" $key eq "interrupt"
Truth table60%3/5
not(A) or B or C or D
A= not defined $keyB= $key eq "q"C= $key eq "eof"D= $key eq "interrupt"
ABCDresult
1XXX1
01XX1
001X1
00011
00000
471 23 ▶ if ($FLAP{$key}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($FLAP{$key}) 17 6 23
472 17 ▶ return 1 if $self->watch;
Branch: 1 branch
BranchTrueFalseTotal
if $self->watch 2 15 17
473 15 ▶ $self->refused($self->refused + 1) unless $self->game->flap;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->game->flap 1 14 15
474 15 return 1;
475 }
476 6 ▶ return $self->_pause if $key eq 'p';
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "p" 3 3 6
477 3 return 1;
478 }
479  
480 3 ▶sub _pause {
Subroutine _pause: called CC=7 SCAR=19.7
481 3 my ($self) = @_;
482 3 $self->_frame('paused');
483 3 while (1) {
484 3 my $key = $self->read_key(undef);
485 3 ▶ return 0 if !defined $key || $key eq 'q' || $key eq 'eof' || $key eq 'interrupt';
Branch: 1 branch
BranchTrueFalseTotal
if not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt" 1 2 3
Condition66%6/9
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
l!l&&r!l&&!r
102
not defined $key or $key eq "q" or $key eq "eof"
l!l&&r!l&&!r
102
not defined $key or $key eq "q"
l!l&&r!l&&!r
102
MC/DC25%1/4
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
not defined $key $key eq "q" $key eq "eof" $key eq "interrupt"
Truth table40%2/5
not(A) or B or C or D
A= not defined $keyB= $key eq "q"C= $key eq "eof"D= $key eq "interrupt"
ABCDresult
1XXX1
01XX1
001X1
00011
00000
486 2 ▶ last if $key eq 'p';
Branch: 1 branch
BranchTrueFalseTotal
if $key eq "p" 1 1 2
487 1 ▶ if ($FLAP{$key}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($FLAP{$key}) 1 0 1
488 1 $self->_on_key($key);
489 1 last;
490 }
491 }
492 2 $self->ticker->start(1 / 20);
493 2 return 1;
494 }
495  
496 7 my $PERIOD = 1 / 20;
497  
498 27 ▶my $one_game = sub {
Subroutine __ANON__: called CC=15 SCAR=27.1
499 27 my ($self, $queued) = @_;
500 27 my $game = $self->game;
501 27 my $ticker = $self->ticker;
502  
503 27 $self->games($self->games + 1);
504 27 ▶ $self->_frame($self->watch || $queued ? undef : 'space to start');
Branch: 1 branch
BranchTrueFalseTotal
$self->watch || $queued ? : 11 16 27
Condition100%3/3
$self->watch or $queued
l!l&&r!l&&!r
10116
MC/DC100%2/2
$self->watch or $queued
$self->watch $queued
Truth table100%3/3
A or B
A= $self->watchB= $queued
ABresult
1X1
011
000
505  
506 27 ▶ unless ($self->watch || $queued) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->watch or $queued) 16 11 27
Condition100%3/3
$self->watch or $queued
l!l&&r!l&&!r
10116
MC/DC100%2/2
$self->watch or $queued
$self->watch $queued
Truth table100%3/3
A or B
A= $self->watchB= $queued
ABresult
1X1
011
000
507 16 my $key = $self->read_key(undef);
508 16 ▶ return 'quit' unless $self->_on_key($key);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->_on_key($key) 1 15 16
509 }
510  
511 26 $ticker->start($PERIOD);
512  
513 26 ▶ while ($game->status ne 'finished') {
Branch: 1 branch
BranchTrueFalseTotal
if ($game->status ne "finished") 3723 4 3727
514 3723 ▶ return 'capped' if $self->max_ticks && $ticker->ticks >= $self->max_ticks;
Branch: 1 branch
BranchTrueFalseTotal
if $self->max_ticks and $ticker->ticks >= $self->max_ticks 6 3717 3723
Condition100%3/3
$self->max_ticks and $ticker->ticks >= $self->max_ticks
!ll&&!rl&&r
20235156
MC/DC100%2/2
$self->max_ticks and $ticker->ticks >= $self->max_ticks
$self->max_ticks $ticker->ticks >= $self->max_ticks
Truth table100%3/3
A and B
A= $self->max_ticksB= $ticker->ticks >= $self->max_ticks
ABresult
0X0
100
111
515  
516 3717 ▶ unless ($ticker->due) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ticker->due) 3717 0 3717
517 3717 my $key = $self->read_key($ticker->remaining);
518 3717 ▶ if (defined $key) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $key) 22 3695 3717
519 22 ▶ return 'quit' unless $self->_on_key($key);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->_on_key($key) 16 6 22
520 6 next;
521 }
522 }
523  
524 3695 ▶ $self->_bot_turn if $self->watch;
Branch: 1 branch
BranchTrueFalseTotal
if $self->watch 3511 184 3695
525 3695 my $step = $game->tick;
526 3695 $ticker->tick($PERIOD);
527 3695 ▶ $self->best($game->score) if $game->score > $self->best;
Branch: 1 branch
BranchTrueFalseTotal
if $game->score > $self->best 27 3668 3695
528 3695 ▶ $self->_frame($step->{died} ? ($game->result->stringify, 'again') : ());
Branch: 1 branch
BranchTrueFalseTotal
$step->{'died'} ? : 4 3691 3695
529 }
530  
531 4 return 'died';
532 7 };
533  
534 26 ▶my $finish = sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
535 26 my ($self) = @_;
536 26 my $game = $self->game;
537 26 ▶ $game->quit unless $game->status eq 'finished';
Branch: 1 branch
BranchTrueFalseTotal
unless $game->status eq "finished" 23 3 26
538 26 $self->leave_raw;
539 26 my $result = $game->result;
540 26 $self->_say($result->stringify);
541 26 return $result;
542 7 };
543  
544 30 ▶sub start {
Subroutine start: called CC=12 SCAR=24.9
Pod documented
545 30 my ($self) = @_;
546 30 my $game = $self->game;
547  
548 30 ▶ if (my $why = $self->too_narrow) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $why = $self->too_narrow) 1 29 30
549 1 $self->refusal($why);
550 1 $self->stopped('narrow');
551 1 return undef;
552 }
553  
554 29 ▶ if ($self->watch) {
Branch: 2 branches
BranchTrueFalseTotal
if ($self->watch) { } 10 19 29
elsif (not $self->enter_raw) { } 3 16 19
555 10 $self->enter_raw;
556 }
557 elsif (!$self->enter_raw) {
558 3 $self->refusal($self->cannot_play);
559 3 $self->stopped('keys');
560 3 return undef;
561 }
562  
563 26 $self->_intro;
564  
565 26 my $queued = 0;
566 26 while (1) {
567 27 my $how = $self->$one_game($queued);
568  
569 27 ▶ if ($how ne 'died') {
Branch: 1 branch
BranchTrueFalseTotal
if ($how ne "died") 23 4 27
570 23 $self->stopped($how);
571 23 return $self->$finish;
572 }
573  
574 4 ▶ return $self->$finish if $self->watch || $self->max_ticks;
Branch: 1 branch
BranchTrueFalseTotal
if $self->watch or $self->max_ticks 2 2 4
Condition66%2/3
$self->watch or $self->max_ticks
l!l&&r!l&&!r
202
MC/DC50%1/2
$self->watch or $self->max_ticks
$self->watch $self->max_ticks
Truth table66%2/3
A or B
A= $self->watchB= $self->max_ticks
ABresult
1X1
011
000
575  
576 2 while (1) {
577 2 my $key = $self->read_key(undef);
578 2 ▶ if (!defined $key || $key eq 'q' || $key eq 'eof' || $key eq 'interrupt') {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt") 1 1 2
Condition66%6/9
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
l!l&&r!l&&!r
101
not defined $key or $key eq "q" or $key eq "eof"
l!l&&r!l&&!r
101
not defined $key or $key eq "q"
l!l&&r!l&&!r
101
MC/DC25%1/4
not defined $key or $key eq "q" or $key eq "eof" or $key eq "interrupt"
not defined $key $key eq "q" $key eq "eof" $key eq "interrupt"
Truth table40%2/5
not(A) or B or C or D
A= not defined $keyB= $key eq "q"C= $key eq "eof"D= $key eq "interrupt"
ABCDresult
1XXX1
01XX1
001X1
00011
00000
579 1 $self->stopped('quit');
580 1 return $self->$finish;
581 }
582 1 ▶ last if $FLAP{$key};
Branch: 1 branch
BranchTrueFalseTotal
if $FLAP{$key} 1 0 1
583 }
584  
585 1 $game->reset;
586 1 $game->flap;
587 1 $queued = 1;
588 }
589 }
590  
591 11 ▶sub usage {
Subroutine usage: called CC=1 SCAR=0.0
Pod documented
592 11 return <<'USAGE';
593 usage: floppy [options]
594  
595 --seed TEXT the game to play: the same seed and the same flaps are the same game
596 --watch watch the bot play
597 --level N the bot's level for --watch, 1 to 3 (default 3)
598 --ticks N stop after N ticks (0, the default, plays to the end)
599 --rows N, --cols N the view in cells; the default fits the window, at most 25 rows
600 --quiet no frames, only how it ended
601 --ascii plain characters instead of block glyphs
602 --colour, --no-colour force colour on or off; NO_COLOR in the environment wins
603 --raylib open a window instead of playing in the terminal
604 (needs Raylib::FFI and perl 5.38 or later)
605 --version, --help
606  
607 keys: space, up, enter, w or k flap; p pauses; q quits; after a death, space plays again.
608  
609 exit status: 0 the game ended or you quit; 2 a bad option, or a game that could not start.
610 USAGE
611 }
612  
613 2 ▶my $sentence = sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
614 2 my ($why) = @_;
615 2 $why =~ s/ at \S+ line \d+\.?\s*\z//s;
616 2 $why =~ s/\A(?:Game::Floppy(?:::\w+)*|floppy): //;
617 2 $why =~ s/\s+\z//;
618 2 ▶ $why .= '.' unless $why =~ /[.!?]\z/;
Branch: 1 branch
BranchTrueFalseTotal
unless $why =~ /[.!?]\z/u 2 0 2
619 2 return $why;
620 7 };
621  
622 2 ▶sub options {
Subroutine options: called CC=1 SCAR=0.0
Pod documented
623 return [
624 2 { name => 'level', type => 'int', min => 1, max => 3, help => "the bot's level, for watch" },
625 { name => 'watch', type => 'flag', help => 'watch the bot fly' },
626 { name => 'rows', type => 'int', min => 10, max => 25, help => 'the view in cells; the default fits the window' },
627 { name => 'seed', type => 'str', help => 'the same seed and the same flaps are the same game' },
628 ];
629 }
630  
631 19 ▶sub run {
Subroutine run: called CC=23 SCAR=34.7
Pod documented
632 19 my ($class, @argv) = @_;
633  
634 19 my %opt;
635 19 my $ok = eval {
636 19 ▶ local $SIG{__WARN__} = sub { my $w = $_[0]; $w =~ s/\s+\z//; print STDERR "floppy: $w\n" };
Subroutine __ANON__: called CC=1 SCAR=0.0
637 19 Getopt::Long::GetOptionsFromArray(\@argv, \%opt,
638 'seed=s', 'level|l=i', 'watch|w', 'ticks=i', 'rows=i', 'cols=i',
639 'quiet|q', 'ascii|a', 'colour|color!', 'raylib', 'version|v', 'help|h');
640 };
641 19 ▶ if (!$ok) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ok) 2 17 19
642 2 print STDERR usage();
643 2 return 2;
644 }
645 17 ▶ if ($opt{help}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt{"help"}) 8 9 17
646 8 print usage();
647 8 return 0;
648 }
649 9 ▶ if ($opt{version}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt{"version"}) 1 8 9
650 1 print "floppy $VERSION\n";
651 1 return 0;
652 }
653 8 ▶ if (@argv) {
Branch: 1 branch
BranchTrueFalseTotal
if (@argv) 1 7 8
654 1 print STDERR "floppy: I do not know '$argv[0]'.\n", usage();
655 1 return 2;
656 }
657  
658 7 my %with;
659 7 ▶ $with{seed} = $opt{seed} if defined $opt{seed};
Branch: 1 branch
BranchTrueFalseTotal
if defined $opt{"seed"} 3 4 7
660 7 ▶ $with{level} = $opt{level} if defined $opt{level};
Branch: 1 branch
BranchTrueFalseTotal
if defined $opt{"level"} 1 6 7
661 7 ▶ $with{max_ticks} = $opt{ticks} if defined $opt{ticks};
Branch: 1 branch
BranchTrueFalseTotal
if defined $opt{"ticks"} 5 2 7
662 7 ▶ $with{rows} = $opt{rows} if defined $opt{rows};
Branch: 1 branch
BranchTrueFalseTotal
if defined $opt{"rows"} 3 4 7
663 7 ▶ $with{cols} = $opt{cols} if defined $opt{cols};
Branch: 1 branch
BranchTrueFalseTotal
if defined $opt{"cols"} 2 5 7
664 7 ▶ $with{watch} = 1 if $opt{watch};
Branch: 1 branch
BranchTrueFalseTotal
if $opt{"watch"} 5 2 7
665 7 ▶ $with{quiet} = 1 if $opt{quiet};
Branch: 1 branch
BranchTrueFalseTotal
if $opt{"quiet"} 2 5 7
666 7 ▶ $with{ascii} = 1 if $opt{ascii};
Branch: 1 branch
BranchTrueFalseTotal
if $opt{"ascii"} 1 6 7
667 7 ▶ $with{ansi} = $opt{colour} ? 1 : 0 if defined $opt{colour};
Branch: 2 branches
BranchTrueFalseTotal
if defined $opt{"colour"} 1 6 7
$opt{'colour'} ? : 0 1 1
668  
669 7 ▶ if ($opt{raylib}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt{"raylib"}) 0 7 7
670 0 ▶ unless (eval { require Game::Floppy::Raylib; 1 }) {
Branch: 1 branch
BranchTrueFalseTotal
unless (eval { do { require Game::Floppy::Raylib; 1 } }) 0 0 0
671 0 print STDERR "floppy: the window is not part of this build; play in the terminal.\n";
672 0 return 2;
673 }
674 0 ▶ unless (Game::Floppy::Raylib->available) {
Branch: 1 branch
BranchTrueFalseTotal
unless ("Game::Floppy::Raylib"->available) 0 0 0
675 0 print STDERR 'floppy: ' . Game::Floppy::Raylib->why_not . "\n";
676 0 return 2;
677 }
678 0 delete @with{qw/ quiet ascii ansi rows cols /};
679 0 my $window = eval { Game::Floppy::Raylib->new(%with) };
680 0 ▶ unless ($window) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($window) 0 0 0
681 0 print STDERR 'floppy: ' . $sentence->($@) . "\n";
682 0 return 2;
683 }
684 0 ▶ return $window->start ? 0 : 2;
Branch: 1 branch
BranchTrueFalseTotal
$window->start ? : 0 0 0
685 }
686  
687 7 my $terminal = eval { $class->new(%with) };
688 7 ▶ unless ($terminal) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($terminal) 2 5 7
689 2 print STDERR 'floppy: ' . $sentence->($@) . "\n";
690 2 return 2;
691 }
692  
693 5 ▶ my $result = Game::Terminal::Kit::Run::guard(sub { $terminal->start }, $terminal);
Subroutine __ANON__: called CC=1 SCAR=0.0
694  
695 5 ▶ return 0 if $result;
Branch: 1 branch
BranchTrueFalseTotal
if $result 3 2 5
696 2 ▶ print STDERR 'floppy: ' . $terminal->refusal . "\n" if CORE::length $terminal->refusal;
Branch: 1 branch
BranchTrueFalseTotal
if length $terminal->refusal 2 0 2
697 2 return 2;
698 }
699  
700 7 1;
701  
702 __END__
« blib/lib/Game/Floppy/Raylib.pm ↑ Summary blib/lib/Game/Floppy.pm »