To determine the number of ranks where dropping is not allowed,
(for pieces that have their drop-limitation flag set in lances[]),
we have to distinguish the Knight. This is now done by assuming that
any piece other than the first two (which are always Pawn and Lance,
even if this requires the Lance to be present as a dummy) is a Knight.
if((signed char)board[from] < -1) { // piece type is in hand
int r, f, start = 0, end = boardEnd;
if(mask & 1) { // piece with drop limitation
- int badZone = (i == 6 ? 44 : 22); // 6 is the Knight in (Judkins) Shogi
+ int badZone = 22 << (i > 1); // if no Pawn or Lance it must be Knight and skip 2 ranks
if(stm == BLACK || !perpLoses) start = badZone;
if(stm == WHITE || !perpLoses) end -= badZone;
}