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

How to Display Legal Moves in Game Courier - A Tutorial. A Game Courier Tutorial.[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Fri, Jan 6, 2017 09:54 PM UTC:

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;