Anyway is the transferrer an interesting concept, or the joker should be enough even in this context?
Well, I dislike Jokers to begin with, so perhaps I am not the right person to comment on this. In principle you can make this as complex as you want: not imitate the piece that was moved, but for each possible type define the type the Joker should move as independently. This way you could also define partical imitation: e.g. if you want to disallowe.p. capture and double push when imitating Pawns, you could define a (no-participating) Pawn without these moves, and ilet the Joker imitate that when a Pawn is moves.
This could be implented by having the user define an array to map (moved) piece types onto (imitated) piece types. In the code you would then simply replace "imitated = movedPiece" by "imitated = transfer[movedPiece]". By default the transfer array would map every type on itself.
Well, I dislike Jokers to begin with, so perhaps I am not the right person to comment on this. In principle you can make this as complex as you want: not imitate the piece that was moved, but for each possible type define the type the Joker should move as independently. This way you could also define partical imitation: e.g. if you want to disallowe.p. capture and double push when imitating Pawns, you could define a (no-participating) Pawn without these moves, and ilet the Joker imitate that when a Pawn is moves.
This could be implented by having the user define an array to map (moved) piece types onto (imitated) piece types. In the code you would then simply replace "imitated = movedPiece" by "imitated = transfer[movedPiece]". By default the transfer array would map every type on itself.