Fixed bug in trapped rook by king: if (i >= A1 && i >= C1) -> if (i >= A1 && i <= C1)