bool moveIsCastle(int m) { final f = moveFlag(m); return f == flagKingCastle || f == flagQueenCastle; }