The current implementation has a board size of 8x8, which allow some shortcuts that are nice. But I would like to implement mini-games with it, and some of them have different board sizes than 8x8.
So the following should be allowed:
Have an additional constructor, that defines the board size different.
Default will be 8x8, so a lot of code can be left as it is.
Find some new elegant implementation for the SquareSet that lives at the moment from the fixed size:
SquareSet uses high/low for the first 32 squares and the second ones. The representation is a number with 32 bits.
There are a lot of magic numbers in the sources: corners = new SquareSet(0x81, 0x8100_0000) ==> first and last square of the first row, first and last square of the last row.
Translate all the magic numbers in at least a constant (if possible), or translate them to the format that helps understand the target.
At the end, the implementation will use row/column pairs instead of just a number (most of the time). Some of the numbers may be made variable, so that they denote all the time the same. So on a 5x5 board, the corners are then: 0x1100011. The internal representation has to be changed, to allow boards bigger than 8x8 (so lo and hi are not sufficient).