Check out Glinski's Hexagonal Chess, our featured variant for May, 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

How to Display Legal Moves in Game Courier - A Tutorial. A Game Courier Tutorial.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Aug 5, 2016 11:55 PM UTC:

This might be an unusual request, but is it possible to clear the moves previously set as legal?

Yes, use setsystem legalmoves ();

 I'm trying to leverage code you have already written in the chess include file to determine that a position is a stalemate, so that I can display a message that even though the position is a stalemate, the King still needs to move (as Kings are allowed to move into check in this variant).

You should copy the subroutine into your preset and modify it to not check whether the King is in check. Then it would accurately report on legal moves in the game.

Is there an easy way to wipe out the legal moves array as a command to be used in the Pre-Move sections of a preset?

Since legal moves are normally calculated in the Post-Move section, there would be nothing to wipe out in the Pre-Move sections.