H. G. Muller wrote on Sat, Aug 14, 2021 02:44 PM UTC:
@Fergus: I don't understand what is wrong with the following GAME code:
for (sqr, piece) $space:
print . iter . #piece #sqr;
if match #piece #toshuffle:
if < * 2 file #sqr lastfile: // left half
push left #sqr;
endif;
if & 1 + file #sqr rank #sqr: // distinguish by shade
push dark #sqr;
else:
push light #sqr;
endif;
endif;
next;
print "got it";
I would have expected it to loop over the board. But instead it prints "iter0" and then exits. If I do a "printr $space" just before it, it does print the board as expected.
@Fergus: I don't understand what is wrong with the following GAME code:
I would have expected it to loop over the board. But instead it prints "iter0" and then exits. If I do a "printr $space" just before it, it does print the board as expected.