NAME
Game::Dominoes::Play - one tile put on the table
VERSION
Version 0.01
SYNOPSIS
my $play = $layout->place($tile, 'L');
$play->tile->stringify; # '6-4'
$play->arm; # 'L'
$play->matched; # 6, the face it was laid against
$play->showing; # 4, the face it leaves open
$play->ends; # the faces open after it
$play->stringify; # '6-4@L'
DESCRIPTION
An immutable record of one play, and the unit both the event log and the notation carry.
points is the exception to the immutability and is deliberately left undef by Game::Dominoes::Layout, which does geometry and knows nothing about fives. Game::Dominoes::Scoring fills it in. A play whose points are undef has not been scored yet, which is not the same as one that scored nothing.
PROPERTIES
tile
$play->tile;
The Game::Dominoes::Tile that was played.
arm
$play->arm; # 'L'
Which arm it went on: L or R along the main line, U or D on the spinner.
matched
$play->matched; # 6
The face it was laid against. Undef for the opening play, which is laid against nothing.
showing
$play->showing; # 4
The face it leaves open. Undef for the opening play, which shows both faces.
spinner
$play->spinner;
Whether this play made the spinner. Only the first double played does, and the notation marks it with a star.
ends
$play->ends;
The faces open after the play, as the layout reported them.
points
$play->points;
What it scored, once Game::Dominoes::Scoring has said. Undef until then.
FUNCTIONS
is_opening
$play->is_opening;
Whether this was the first tile of the hand.
stringify
$play->stringify; # '6-4@L', or '5-5@L*' for the spinner
The play as the notation writes it.
SEE ALSO
Game::Dominoes::Layout, which makes these.
AUTHOR
LNATION <email@lnation.org>
BUGS
Please report any bugs or feature requests to bug-game-dominoes at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Game-Dominoes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Game::Dominoes::Play
ACKNOWLEDGEMENTS
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)