Commits

Shlomi Fish committed 8eee450

Convert another place to ::Coord.

From _to_xy.

  • Participants
  • Parent commits 5400384

Comments (0)

Files changed (2)

abc-path/Games-ABC_Path-Generator/lib/Games/ABC_Path/Generator.pm

                         [
                             map { $handle_clue->($_) } @{$last_state->{clues}}
                         ],
-                        A_pos => [$self->_to_xy($A_pos)],
+                        A_pos => Games::ABC_Path::Generator::Coord->_from_int($A_pos),
                     }
                 );
                 

abc-path/Games-ABC_Path-Generator/lib/Games/ABC_Path/Generator/RiddleObj.pm

 
     my $s = ((' ' x 7)."\n")x7;
 
-    substr($s, ($self->_A_pos()->[$Y]+1) * 8 + $self->_A_pos->[$X]+1, 1) = 'A';
+    substr($s, ($self->_A_pos->y + 1) * 8 + $self->_A_pos->x + 1, 1) = 'A';
 
     my $clues = $self->_clues();
     foreach my $clue_idx (0 .. $NUM_CLUES-1)