viresh-ratnakar / exolve

Online interactive crossword software in JavaScript
MIT License
73 stars 15 forks source link

'loop in successor' error when a linked clue shares the top-right corner square #21

Closed Antagony1060 closed 4 years ago

Antagony1060 commented 4 years ago

Given a 5x5 grid with the answer to 1a linking to 3d:

  exolve-grid:
    00000
    0.0.0
    00000
    0.0.0
    00000
  exolve-across:
    1,3 The clue… (5,5)

it throws the error 'loop in successor for 0,4'.

I've played around with it a bit and as far as I can tell it only occurs when the square in the top-right corner of the grid is shared between two successive chained lights. For example: in a larger grid with two lights on the top row, the error only occur if the chain order is 1a,2a,3d. Both 2a,1a,3d and 1a,3d,2a work fine.

viresh-ratnakar commented 4 years ago

Ah, interesting!

I've fixed it in v0.48.

One minor note is that when you backspace through and land on the shared end-point, you cannot backspace further unless you click to toggle the direction. I had not implemented backspacing across linked clues, which seems like an OK thing in general, except for this "shared end-point" situation. I'll file a bug and think about it.

Antagony1060 commented 4 years ago

That was remarkably quick, thank you! Tested and working great.