#!/usr/bin/perl
use
strict;
use
warnings;
use
FindBin;
my
$board
= Games::Checkers::Board->new(
$ENV
{BOARD},
$ENV
{BOARD_SIZE});
sub
dump_location ($) {
my
$loc
=
shift
;
return
sprintf
(
"%02d (%s)"
,
$loc
,
$board
->loc_to_str(
$loc
));
}
"All board locations:\n"
;
my
$iterator
= Games::Checkers::LocationIterator->new(
$board
);
my
@locations
=
$iterator
->all;
"\t"
, dump_location(
$_
),
"\n"
foreach
@locations
;