NAME
Game::Sternhalma::Result - how a game of sternhalma ended, and in what places
SYNOPSIS
my $result = $game->result; # once $game->over
print $result->how, "\n"; # home, cap, deadlock or resign
print join(' ', $result->ranking), "\n"; # seats, best first
print $result->winner // 'shared', "\n";
DESCRIPTION
A game of more than two ends with every seat placed: the seats home in the order they got there, then the seats still racing, then the seats that resigned. At the cap, or when nobody could move, seats still racing are placed by how far they are from home, and equal distances share a place.
METHODS
how
home (everyone but one home), cap (the move limit), deadlock (nobody could move) or resign (resigning left one seat racing).
places
An array reference of every seat's place, in seat order, 1 the best.
place_of
$result->place_of($seat)
ranking
The seats best first; seats that share a place in seat order.
winner
The seat in first place, or undef when first place is shared.
seats
How many seats played.
ply
Moves and passes made.
position
The final position as a string.
ways
Every way a game can end.
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)