Games-Backgammon
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
Backgammon.pm view on Meta::CPAN
sub new {
my ($class, %arg) = @_;
$class = ref($class) || $class;
croak "Sorry, but I need a starting position" unless defined $arg{position};
my $self = {
whitepoints => undef,
blackpoints => undef,
atroll => 'black',
};
bless $self => $class;
$self->_init(%arg);
return $self;
}
sub _init {
my ($self, %arg) = @_;
$self->__init;
$self->set_position(%{$arg{position}});
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.881 second using v1.00-cache-2.02-grep-82fe00e-cpan-a086c87fca4 )