Acme::Mahjong - Simple Mahjong Utility
my $m = Acme::Mahjong->new( rule => Achme::Mahjong::Rule::JP->new(), ); my $hand = $m->hand_create(); my $deck = $m->deck_create(); for( 1..13 ) { my $tile = $deck->next(); $hand->add( tile => $tile ); } my $score = $m->calculate( hand => $hand, deck => $deck, );
Proof of concept release! Don't use this just yet!
Mahjong is a wonderful game, which could get you literally addicted. However, the game involves exceptionally extraneous score calculation rules, which may differe from place to place (Not only between countries, but there are all sorts of local rules)
This module attempts to help with that process, along with whatever else that we may be able to come up.
Still need to figure out the actual 'yaku' from the tiles.
Daisuke Maki <daisuke@endeworks.jp>
<daisuke@endeworks.jp>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install Acme::Mahjong, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Mahjong
CPAN shell
perl -MCPAN -e shell install Acme::Mahjong
For more information on module installation, please visit the detailed CPAN module installation guide.