NAME
Game::Fanorona::Move - one whole move: a stone, its steps, and what each took
VERSION
Version 0.03
SYNOPSIS
use Game::Fanorona::Engine ':all';
my $board = Game::Fanorona::Engine->new;
for my $move ($board->moves) {
printf "from %d, %d step(s), %d stone(s) taken\n",
$move->from, $move->length, scalar($move->taken);
}
DESCRIPTION
Everything one side does before the other plays. A move is either a single step that takes nothing, a paika, or a chain: one or more steps by the same stone, every one of which takes.
A chain may be stopped after any of its steps. So where a stone could take three times running, taking once, taking twice and taking three times are three different moves, and "moves" in Game::Fanorona::Engine lists all three.
A move is a value. It is made by the engine and holds no board; playing it is "play_move" in Game::Fanorona::Engine.
METHODS
from
The point the stone starts on.
to
The point it ends on.
steps
An array reference of the steps, in order. Each is the hash "A step" in Game::Fanorona::Engine describes: from, to, dir, kind and taken.
length
How many steps: 1 for a paika.
taken
Every point a stone was taken from, in the order they went.
is_paika
True for a move that takes nothing.
points
Every point the stone stands on, the start first.
AUTHOR
LNATION <email@lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by LNATION <email@lnation.org>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)