05-12-2023, 12:28 PM
Hi,
here's a .lud that seems to be doing what you want. Feel free to tell me if I misunderstood your description. It's not very simple/elegant unfortunately, I had to list all the knight walks twice and since I'm using "(foreach Piece)" the "NextMoves" generate moves for all pieces, not just the one you moved in "FirstMove" (you'll notice this when passing e.g.). If anyone knows how to write a better version of this I'd like to know.
here's a .lud that seems to be doing what you want. Feel free to tell me if I misunderstood your description. It's not very simple/elegant unfortunately, I had to list all the knight walks twice and since I'm using "(foreach Piece)" the "NextMoves" generate moves for all pieces, not just the one you moved in "FirstMove" (you'll notice this when passing e.g.). If anyone knows how to write a better version of this I'd like to know.