H. G. Muller wrote on Sun, Aug 15, 2021 05:32 AM EDT:
@Fergus: In the routine below the variable 'sqr' stays 0 for all iterations. Only when I deleted the comma ("for (sqr piece) $space;") it runs through the square labels. Yet the GAME code manual suggest a comma should be present.
(And thanks for fixing the dash problem; I would never have found that.)
Yet another question: is there an elegant way to convert internal rank and file number to the square label? For games that need symmetric shuffling I first shuffle the white pieces, and then copy the white setup (color-flipped) to the black camp, and for that I have to derive the label of the mirror square. This is now done by a pretty complex calculation. Which only works if rank labeling is a consecutive range of integers.
@Aurelian: The FEN for your start position has one dash too many at the start. Otherwise it should work now. (At least the shuffling.)
@Fergus: In the routine below the variable 'sqr' stays 0 for all iterations. Only when I deleted the comma ("for (sqr piece) $space;") it runs through the square labels. Yet the GAME code manual suggest a comma should be present.
(And thanks for fixing the dash problem; I would never have found that.)
Yet another question: is there an elegant way to convert internal rank and file number to the square label? For games that need symmetric shuffling I first shuffle the white pieces, and then copy the white setup (color-flipped) to the black camp, and for that I have to derive the label of the mirror square. This is now done by a pretty complex calculation. Which only works if rank labeling is a consecutive range of integers.
@Aurelian: The FEN for your start position has one dash too many at the start. Otherwise it should work now. (At least the shuffling.)