NAME
Game::Oware::Notation - house letters, transcripts, and boards as text
VERSION
Version 0.02
SYNOPSIS
use Game::Oware::Notation;
Game::Oware::Notation->letter_of(4); # E
Game::Oware::Notation->index_of('c'); # 8
Game::Oware::Notation->parse('EcAb'); # [ 4, 8, 0, 7 ]
DESCRIPTION
The letters are standard, the transcript container is ours
Upper case A to F for one side and lower case a to f for the other is the convention every published diagram uses, and the one the Wikipedia article's own worked example is written in: "the lower player prepares to sow from E", "e, d, and c are captured".
Joining the letters into a transcript with no separator is not standard. Joan Sala's Aualé saves games in a format that "resembles PGN", but no specification of it could be found to cite, so it is not adopted and nothing here claims to read it.
A transcript is self-describing, and that is a fact about the rules
The case carries the seat, so a parser never has to track whose turn it is in order to attribute a move. That is the opposite of Game::Reversi::Notation, where a transcript is a list of squares, a forced pass is usually not written down, and a parser that assumes strict alternation misattributes every move after the first one.
Oware has no pass, so alternation is strict and is enforced
The feeding obligation means a seat on turn always has seeds: if the opponent could feed them they were obliged to, and if they could not the game is already over. So there is no forced pass, nothing to reconstruct on read, and no token for one.
Which makes two consecutive moves by the same seat something no game can produce, so parse refuses it rather than quietly reattributing it. p1 moves first.
The board layout puts each row where the article draws it
Top row is p2's, read f to a right to left; bottom row is p1's, read A to F left to right; each row carries its own store in brackets. Sowing then runs left to right along the bottom and right to left along the top, which is one continuous counter-clockwise ring on the page.
text_to_board ignores any line with no digits in it, so the letter headers board_to_text writes are optional on the way back in and a diagram transcribed from a source can keep whatever labels it came with.
FUNCTIONS
letters
Every house letter, in index order.
letter_of
The letter for a house index.
index_of
The house index for a letter. Dies on anything else.
seat_of
The seat that owns the house a letter names.
render
A list of house indices as a transcript string.
parse
A transcript string as an arrayref of house indices. Dies if the seats do not alternate, or if p1 does not move first.
board_to_text
A board as four lines: the two letter headers, and the two rows with their stores.
text_to_board
Four lines, or just the two numeric rows, back into a board.
SEE ALSO
Game::Oware, Game::Oware::Board, Game::Oware::Move
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.