Commits

shl...@b384bcd7-cfd4-0310-aca0-d78b80f7b91b  committed 9ae58f2

Create _new_coords and convert to it.

This wraps the Games::Nurikabe::Solver::Coords constructor.

  • Participants
  • Parent commits 00ad154

Comments (0)

Files changed (1)

File nurikabe-solver/Games-Nurikabe-Solver/lib/Games/Nurikabe/Solver/Base.pm

     return $self;
 }
 
+sub _new_coords
+{
+    my ($self, $yx) = @_;
+
+    return Games::Nurikabe::Solver::Coords->new($yx);
+}
+
 =head2 my $offset_coords = $self->add_offset($coords, $offset)
 
 Returns the offset coords based on $coords (an [Y,X] coordinates
 {
     my ($self, $coords, $offset) = @_;
 
-    return Games::Nurikabe::Solver::Coords->new(
+    return $self->_new_coords(
         {
             y => $coords->y + $offset->[0], 
             x => $coords->x + $offset->[1],