Check out Janggi (Korean Chess), our featured variant for December, 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

Jumping Chess. Pieces capture by jumping. Board has extra edge squares making it 10x10. (10x10, Cells: 100) [All Comments] [Add Comment or Rating]
🕸Fergus Duniho wrote on Sat, Oct 10, 2020 05:04 PM UTC in reply to H. G. Muller from 07:29 AM:

@Fergus - What would be the best way to manipulate the $legalmoves array, if I want to remove some moves that in hindsight must not be highlighted after all? Would the following code work?

set tmp $legalmoves;
setsytem legalmoves array; // clear the legal list
for m #tmp:
 if fn SomeTest #m:
   setlegal m;
 endif;
next;

You made a typo. setsytem should be setsystem. With that fixed, it looks like it would work. Since the documentation did not mention that it would work, I updated the documentation. But it will work only for legal moves described as arrays of coordinates for $legalmoves. It will not work for legal moves entered as strings.