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

Glinski's Hexagonal Chess. Chess on a board made out of hexagons. (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Sat, Mar 11, 2023 02:42 AM UTC in reply to Daniel Zacharias from Fri Mar 10 11:21 PM:

There was a similar problem with the King, and I fixed both. The problem was with the functions for ascertaining the range of the piece, which were used only for potential moves. When I tried to make moves, they worked, and what I needed to fix were the NL, nL, KL, and kL functions. Here is an example of what was no longer working:

def NL array where #0 1 2 where #0 2 1 where #0 -1 -2 where #0 -2 -1 where #0 1 -3 where #0 -1 3 where #0 -3 1 where #0 3 -1 where #0 2 -3 where #0 -2 3 where #0 -3 2 where #0 3 -2;

I believe the problem arose if any of these where clauses returned false instead of a coordinate. To get around that, I replaced the code with this:

def NL aggregate lambda (where #frm #0 #1) ((1 2) (2 1) (-1 -2) (-2 -1) (1 -3) (-1 3) (-3 1) (3 -1) (2 -3) (-2 3) (-3 2) (3 -2)) =frm;

This uses the aggregate function to build an array of non-empty values of the lambda function, and it passes it the same set of values as the previous code did. So, whenever the where function returns false, it doesn't get added to the array.