Permalink
Browse files

fully support rule item CAPTURE_SEPARATOR

  • Loading branch information...
1 parent 033ffa7 commit 9f1620f7eedcbfbc00dff5defaf28f0711b1173a @mig0 committed Jun 1, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/Games/Checkers/Move.pm
  2. +3 −3 lib/Games/Checkers/Rules.pm
@@ -65,7 +65,7 @@ sub dump ($$) {
my $self = shift;
my $board = shift || die;
- my $delim = $self->is_beat ? ":" : "-";
+ my $delim = $self->is_beat ? $::RULES{CAPTURE_SEPARATOR} || ":" : "-";
my $str = $board->loc_to_str($self->source);
for (my $i = 0; $i < $self->num_steps; $i++) {
$str .= $delim . $board->loc_to_str($self->destin($i));
@@ -26,7 +26,7 @@ our %variant_rules = (
international => {
BOARD_SIZE => '10x10',
BOARD_NOTATION => 'TL',
- BOARD_NOTATION_SEPARATOR => 'x',
+ CAPTURE_SEPARATOR => 'x',
STARTING_ROWS => 4,
BOTTOM_LEFT_CELL => 1,
PDN_GAME_TYPE => 20,
@@ -45,7 +45,7 @@ our %variant_rules = (
base => 'international',
BOARD_SIZE => '8x8',
BOARD_NOTATION => 'A1',
- BOARD_NOTATION_SEPARATOR => ':',
+ CAPTURE_SEPARATOR => ':',
STARTING_ROWS => 3,
PDN_GAME_TYPE => 25,
CAPTURING_LARGEST => 0,
@@ -116,7 +116,7 @@ our %variant_rules = (
thai => {
base => 'english',
BOARD_NOTATION => 'BR',
- BOARD_NOTATION_SEPARATOR => '-',
+ CAPTURE_SEPARATOR => '-',
STARTING_ROWS => 2,
PDN_GAME_TYPE => 31,
WHITE_STARTS => 1,

0 comments on commit 9f1620f

Please sign in to comment.