NAME
Game::RoyalUr::Result - how a game of the Royal Game of Ur ended
VERSION
Version 0.01
SYNOPSIS
if (my $result = $game->result) {
print $result->is_draw ? "a draw\n" : $result->winner . " wins\n";
print 'by ', $result->how, ' in ', $result->plies, " plies\n";
}
DESCRIPTION
What a finished game came to. "result" in Game::RoyalUr returns one of these once a game is over, and undef until then. It is read and never changed.
METHODS
winner
'light' or 'dark', or undef for a draw.
loser
The other side, or undef for a draw.
is_draw
True when nobody won.
how
home-
The winner brought its last piece home.
resign-
The loser resigned.
ply_cap-
The game ran to the limit on its length and was drawn. A capture sends a piece back to the start, so nothing else guarantees that a game ends; the limit is set far above the length of any game play produces.
final
The position the game ended in, as a string.
home
A hash reference, { light => ..., dark => ... }: how many pieces each side had brought home.
plies
How many moves and lost turns the game ran to.
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)