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, Oct 29, 2022 09:08 AM UTC in reply to Carlos Cetina from 08:37 AM:

OK, I discovered the same. The highlighting is broken. The problem is that in the method I programmed the virginity of the Bishop is determined from the origin square (var ori). That is correct for checking the legality of the move. But not when highlighting, because possible moves for white are highlighted after the black move is made. And at that time var ori holds the origin of the black move. So instead of testing the virginity of the white Bishop it highlights the moves of, it tests whether the last-moved opponent piece was virgin! (Of course this sometimes does give the correct result, when that previously moved piece happens to have the same virginity as the Bishop.)

I now made a tiny change in the included betza.txt file to make the origin square of the piece for which moves are generated already available to the B and b functions as var ss. The two functions can then use that instead of var ori, by changing those to:

def B cond #0 (cond flag var ss 598 cond == 1 var wstart 598 cond var wstart 124 104) 0;
def b cond #0 (cond flag var ss 598 cond == 1 var bstart 598 cond var bstart 124 104) 0;