What I was thinking is that since these pieces have only one possible destination for each capturing move, I can have the move entered as a normal displacement capture and then move the piece to the calculated destination represented by #after. That seemed like it would be simpler to implement and would also resolve ambiguity for situations where a move could be either capturing or non-capturing.
To do this, I have subroutines for the relevant pieces that move them again if they made a capture, and also that section in stalemated to do the same when calculating legal moves.
But all this seems to mess up the king's move somehow, so either I'm doing it wrong or I need a different strategy.
What I was thinking is that since these pieces have only one possible destination for each capturing move, I can have the move entered as a normal displacement capture and then move the piece to the calculated destination represented by
#after
. That seemed like it would be simpler to implement and would also resolve ambiguity for situations where a move could be either capturing or non-capturing.To do this, I have subroutines for the relevant pieces that move them again if they made a capture, and also that section in
stalemated
to do the same when calculating legal moves.But all this seems to mess up the king's move somehow, so either I'm doing it wrong or I need a different strategy.