NAME
Game::Oware::Move - one sowing, and what it took
VERSION
Version 0.01
SYNOPSIS
use Game::Oware::Move;
my $move = Game::Oware::Move->new(
seat => 'p1', house => 4, sown => 6, last => 10,
captured => [ 10, 9, 8 ], taken => 8);
print $move->stringify; # E takes 8
DESCRIPTION
A value object. The same one the terminal prints and the site adapter puts in its event log.
taken, and never score
The site this engine was written for bans a set of view key names with an anchored regular expression, and score singular is on it while scores plural is not. The gate exists to stop a view carrying a bot's opinion of a position, and a game whose central noun is a score would fail a test about search leakage for a reason that has nothing to do with search.
Oware's natural English for a store is a "score house", so this is the name a writer reaches for first. It is taken instead, and the list of houses is captured rather than line, which is on the same ban.
slammed says what the move was, forfeited says what was done about it
slammed is true when the chain would have taken every seed the opponent had. That is a fact about the move and it does not depend on the rule set. forfeited holds the chain that was given back, which happens only under the no_capture policy; under illegal_unless_only a slammed move captures normally and forfeited is empty.
Keeping them apart is what lets one Move class describe both variants without a flag meaning two things.
A forfeited chain is not the same as capturing nothing
Most moves capture nothing because they did not land where they needed to. A forfeited move computed a capture and then gave it back, because taking it would have left the opponent with no seeds and therefore no move.
A log that recorded only the outcome could not tell the two apart, and "you sowed into three houses of two and took nothing" is a sentence the terminal and the site both have to be able to say. Without it the rule reads as a bug, and it is the single most likely thing in this game to be reported as one.
What BUILD refuses
Only things no correct engine can produce: a seat sowing from a house it does not own, a move capturing more houses than it sowed seeds, a seat capturing its own house, a move that both captured and forfeited a chain, and a chain forfeited by something that was not a grand slam. These are programmer errors, so they die. A player's bad move is a Game::Oware::Error and is returned.
There is deliberately no separate refusal for a forfeited chain that took seeds. A forfeit captures nothing, so taken without captured already refuses it, and a second die for the same case could never be reached.
PROPERTIES
seat
p1 or p2.
house
The house sown from, 0 to 11, always one the seat owns.
sown
How many seeds left that house.
last
The index the final seed landed in.
captured
The houses emptied, in walk-back order. Empty when nothing was captured.
taken
How many seeds that was.
slammed
True when the chain would have taken every seed the opponent had.
forfeited
The chain that was given back, empty unless the variant forfeits a slam.
METHODS
name
The move in notation: a single letter.
stringify
The move as a short phrase, for a transcript or a log line.
SEE ALSO
Game::Oware, Game::Oware::Board, Game::Oware::Notation
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.