[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Check out Janggi (Korean Chess), our featured variant for December, 2024.
Check out Janggi (Korean Chess), our featured variant for December, 2024.
The problem is that onlyupper and onlylower each returned an array of pieces that was indexed to coordinates, and the lambda functions I gave you return arrays that are numerically indexed. So, forget about the lambda functions, delete the definitions for the friends functions, replace "fn friends" with "pieces" and modify the part of the code that makes sure the piece isn't the King to also make sure it is a friend.
if == #from #king or not fn friend #piece:
continue;
endif;