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

Apothecary Chess-Classic. Large board variant obtained through tinkering with known games.[All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Tue, Mar 24, 2020 08:15 PM UTC:

The problem was caused by using #lastpiece instead of var lastpiece. The former inserts the value into the line during preprocessing, which doesn't work out so well for null or empty values, while the latter looks it up while evaluating the expression. These will work instead.

def Joker fn const alias var lastpiece #0 #1;
def Joker-Range fn join const alias var lastpiece "-Range" #0;

One thing that has come up while examining your code is how you want the Joker to move after a piece that moves differently for each side, such as the Pawn. Should it move as the enemy Pawn, which is how it currently works, or as its own Pawn? For the latter, these should work:

def Joker fn const alias flipcase var lastpiece #0 #1;
def Joker-Range fn join const alias flipcase var lastpiece "-Range" #0;

While these changes eliminate the problem you were having, there is still a problem with actually moving the Joker piece. One problem is that the Joker doesn't properly handle pieces that use subroutines instead of functions. But even with pieces that just use functions, it is not working properly. I'm getting too tired to continue looking into this today. Maybe I'll make more progress tomorrow.