I want to write a subroutine for the Apothecary chess games (here they have the same rule) because besides the regular moves the king as long as he has not moved and is not in check may make the 2 camel and the 2 knight leaps that move 1 rank behind (above for black). I'm not sure if a subroutine is the best choice and I don't understand what happens with the default King subroutine in regular castling games.
Should I use a subroutine?
How this subroutine should interact with the stalemated subroutine and endgame code?
I want to write a subroutine for the Apothecary chess games (here they have the same rule) because besides the regular moves the king as long as he has not moved and is not in check may make the 2 camel and the 2 knight leaps that move 1 rank behind (above for black). I'm not sure if a subroutine is the best choice and I don't understand what happens with the default King subroutine in regular castling games.
Should I use a subroutine?
How this subroutine should interact with the stalemated subroutine and endgame code?
How should these moves be displayed?