NAME
Game::Go::Move - one move, of one kind
VERSION
Version 0.01
SYNOPSIS
my $move = $game->play('b', $pt);
$move->kind; # 'play'
$move->point; # the padded index
$move->caps; # the points the captured stones came off
$move->captured; # how many
DESCRIPTION
A move that happened. A move that did not is a Game::Go::Error instead, so a caller holding one of these is holding something the rules allowed.
The kinds, and why there are so many
play pass handicap resign
mark unmark seki unseki done accept dispute
The first four are the game. The last seven are the confirmation phase, which exists because Article 9 of the Japanese rules does not end a game when play stops:
After stopping, the game ends through confirmation and agreement by the two
players about the life and death of stones and territory.
That is a negotiation between two people, so it has moves of its own, and they are moves rather than some separate kind of message because they go in the same log and a replay has to reproduce them the same way.
handicap is its own kind rather than a play so that the log can say "black takes five handicap stones" instead of narrating five moves nobody made, and so that a replay can check the stones landed on the traditional points.
ATTRIBUTES
kind
One of the eleven above. Anything else dies at construction: it is programmer error, not a refused move.
colour
BLACK or WHITE. Required, including on the confirmation moves, because the log records who said it.
point
The engine's padded index, for the kinds that have one, and undef for the kinds that do not. Opaque: it is not row * size + col. See "A point is opaque" in Game::Go.
A move whose kind takes no point and carries one anyway dies, and so does one whose kind needs a point and has none. That is cheap here and expensive to find in a replay.
caps
The points the captured stones came off, as an arrayref. Only a play may carry any.
METHODS
kinds
Every kind, as a list.
is_play, is_pass
captured
How many stones this move took.
stringify
A sentence. For the log page the site writes its own, because it knows the players' names and this does not.
SEE ALSO
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)