Bob Greenwade wrote on Tue, Feb 27, 2024 06:09 PM UTC:
I'm trying to build a piece that moves like a normal Rook, and then, if there's an empty square in the next space forward and an enemy piece in the next space beyond that, pulls the enemy piece into the empty square. I'm still a bit inexperienced with u, but it seems to me that the bracket notation should be built thus:
The basic move, R
The rest is optional, so ?
The next space is to be a destination, so ufW
Then capture the enemy piece in the next space, so -cfW (said enemy will then go to the first space)
The jump back to where the Rook move ended, so -bD
But when I try [R?ufW-cfW-bD] out in the Sandbox, the enemy piece and moving piece just end up in each others' places. I'm not sure what I'm doing wrong here.
I'm trying to build a piece that moves like a normal Rook, and then, if there's an empty square in the next space forward and an enemy piece in the next space beyond that, pulls the enemy piece into the empty square. I'm still a bit inexperienced with u, but it seems to me that the bracket notation should be built thus:
But when I try [R?ufW-cfW-bD] out in the Sandbox, the enemy piece and moving piece just end up in each others' places. I'm not sure what I'm doing wrong here.