NAME
Games::Go::Cinderblock::Rulemap - The beating heart of cinderblock.
SYNOPSIS
my $rulemap = Games::Go::Cinderblock::Rulemap::Rect->new(
w => 11,
h => 8,
wrap_h => 1,
wrap_v => 1,
);
my $state = $rulemap->initial_state;
my $move_result = $state->attempt_move(
color => 'b',
node => [3,3],
);
say $move_result->succeeded ? 'success!' : ('failed? ' . $move_result->reason);
$state = $move_result->resulting_state;
# do something with $move_result->delta.
DESCRIPTION
This module is basically basilisk::Rulemap, now mostly split into a bunch of helper modules. The intention is still to use Moose's metaclass capabilities & method modifiers to override aspects of the default behavior.
This class still uses subclasses to define topology, and still only one topology is in a usable state: Games::Go::Cinderblock::Rulemap::Rect.