NAME

Game::Senet::Result - how a game of Senet ended

VERSION

Version 0.02

SYNOPSIS

if (my $result = $game->result) {
    print $result->is_draw ? "drawn\n" : $result->winner . " won by " . $result->how . "\n";
}

DESCRIPTION

The end of a game: who won and how, the last position, both homes, and how long it took. There is no draw but the ply cap: a game that reaches it has no winner, whoever is ahead.

METHODS

winner

light, dark, or undef for a draw.

loser

The other side, or undef.

how

home when a side bore off every piece, resign, or ply_cap.

is_draw

True for ply_cap and nothing else.

final

The last position, as a position string.

home

{ light => $n, dark => $n }: the pieces each side bore off.

plies

Moves and forfeits made.

throws

Throws of the sticks made.

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)