fixed errors in Board.castleKing