Zach Morgan > Games-Go-Cinderblock-0.12 > Games::Go::Cinderblock::Rulemap

Download:
Games-Go-Cinderblock-0.12.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Games-Go-Cinderblock-0.13

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.

METHODS ^

initial_state

nodeset

empty_board

all_nodes

syntax highlighting: