NAME
Game::Mahjong::Tally - what a winning hand scored, and how
VERSION
Version 0.01
SYNOPSIS
my $tally = Game::Mahjong::Score::score($hand, $winning, \%ctx);
$tally->points; # 91, flowers included
$tally->basic; # 91, without flowers: what the minimum reads
$tally->minimum_met; # 1
$tally->fans; # [ { key, name, points, times, total }, ... ], highest first
$tally->has_fan('big_four_winds'); # 1
DESCRIPTION
The scorer's answer for one hand: the fans that counted after the five principles, each with how many times it counted and what that came to, the split the maximum was found in, the flowers, and whether the eight-point minimum was met without them.
ATTRIBUTES
points
The total, flowers included.
basic
The total without flowers, which the minimum is tested against (3.11.6.6).
flowers
How many flower points were added.
fans
The fans that scored, highest first: { key, name, points, times, total }.
split
The decomposition the maximum came from, with its placement.
minimum_met
Whether basic reaches Game::Mahjong::Score's MINIMUM.
METHODS
keys_of
The fan keys, in order.
has_fan
How many times a fan counted, 0 if it did not.
describe
One line, for the terminal.
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.