Commits

Anonymous committed e44a19d

Working now - for "--seed=1".

TODO :

1. Make sure that the clues of the top/bottom, left/right are shuffled
randomly (to avoid predictability).

2. Check that the layout and the clues only have one solution.

  • Participants
  • Parent commits 8d9618c

Comments (0)

Files changed (1)

File abc-path/generator/generate-abs-path.pl

     return join('', map { $render_row->($_) . "\n" } (0 .. $LEN-1));
 }
 
-my $NUM_CLUES = (2+5+5); 
+my $NUM_CLUES = (2+5+5);
+
 sub calc_riddle
 {
     my ($self) = @_;
     
     my $s = ((' ' x 7)."\n")x7;
 
-    substr($s, $riddle->{A_pos}->[$Y] * 8 + $riddle->{A_pos}->[$X], 1) = 'A';
+    substr($s, ($riddle->{A_pos}->[$Y]+1) * 8 + $riddle->{A_pos}->[$X]+1, 1) = 'A';
 
     my $clues = $riddle->{clues};
     foreach my $clue_idx (0 .. $NUM_CLUES-1)