NAME
Game::RoyalUr::Move - one piece moved by one roll
VERSION
Version 0.01
SYNOPSIS
my ($move) = $board->moves(3);
print $move->from, ' to ', $move->to, "\n"; # hand to b1
print "captures\n" if $move->captures;
print "roll again\n" if $move->rosette;
DESCRIPTION
What a roll lets one piece do: where it starts, where it lands, and what is standing there. A move is made for you by "moves" in Game::RoyalUr::Engine, and describes a move without making it.
A move is read and never changed.
Two ways to say where
A place on the board has a name, like d2, which is the same for both sides, and a step, its number along the mover's own route, which is not. A move carries both, because what stands on a square is a question about the square and how far a piece has come is a question about the step.
METHODS
side
'light' or 'dark': whose piece it is.
roll
The roll that allows it, 1 to 4.
from
Where the piece starts: a square's name, or 'hand' for a piece entering the board.
to
Where it lands: a square's name, or 'home' for a piece leaving the board at the end of its route.
from_step
The step it starts on, counted along its side's route from 1. 0 is the hand.
to_step
The step it lands on. One more than the route's last step is home.
from_cell
The cell it starts on, as Game::RoyalUr::Engine numbers cells, or -1 from the hand.
to_cell
The cell it lands on, or -1 for home.
captures
True when an enemy piece stands where it lands.
rosette
True when it lands on a rosette. Never true of a piece going home.
home
True when the piece leaves the board.
trace
2>5 a plain move from step 2 to step 5
5>8x* a capture on a rosette
The two steps with a > between them, then x for a capture and * for a rosette. A compact form for comparing lists of moves.
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)