Check out Makruk (Thai Chess), our featured variant for March, 2025.


[ 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

Play-test applet for chess variants. Applet you can play your own variant against.[All Comments] [Add Comment or Rating]
💡📝H. G. Muller wrote on Sat, Jan 9, 2021 05:09 PM EST in reply to Fergus Duniho from 03:33 PM:

In the Post-Game code, mln should be equal to $maxmln. So, you would need another method for checking whether it is on the last move.

The Post-Game code is only executed after the last move. So I shouldn't have to check anything, other than whether the preceding move could be a promotion. The preceding move is guaranteed to be the very latest move.

Since you are running all the moves in the Post-Game section, you will have to come up with a different method than I use.

I don't run any moves in the Post-Game section. Each move is run in the Post-Move section. The Post-Game section just tests whether the latest move (which could be the one the user entered, and was not checked before) is legal. That includes checking whether any specified promotion is legal, or whether it is legal to not specify one.