public boolean isCastlingMove(Piece piece, Field from, Field to) {
		int fileDifference = from.distanceBetweenFile(to);
		if (piece instanceof King && piece.isFirstMove() && to.inSameRankAs(from) && Math.abs(fileDifference) == 2) {
			Field rookField = this.window.board.getField(fileDifference == 2 ? 'h' : 'a', from.rank); // Positive difference when the rook moves left
			Piece rook = rookField.getPiece();
			Player player = this.getPlayerFromColor(piece.isWhite);
			return rook != null && rook instanceof Rook && rook.isFirstMove() && this.window.board.clearPathInRankBetween(from, rookField) && !this.castlingFieldsInCheck(from, to, player);
		}
		return false;
	}