Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

The birth of 3 new variants - part 2 : Grand Apothecary Chess Modern[Subject Thread] [Add Response]
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.