The board is organized in 137 “segments” for which the remaining two sides are tracked in the database.

The segments are numbered according to the location number:

  • Above = location
  • Below = location + 8
  • Left = 100 + location
  • Right = 100 + location + 1

Initial board

The columns on the far left and right have the same segment number. Since these hold the same 1 remaining option, it was an acceptable side-effect.

8 columns + 8 rows + bottom row + right of 64 = 8x8+8x8+8+1 = 64+64+8+1 = 137 segments.