private boolean castlingFieldsInCheck(Field from, Field to, Player player) {
		if (this.window.board.inCheck(player)) {
			return true;
		} else {
			boolean castlingFieldInCheck = false;
			Field castlingField = this.window.board.getField(from.file < to.file ? 'e' : 'c', from.rank);
			Piece tempPiece = new King(player.isWhite, null);
			castlingField.addPiece(tempPiece); // Add temporary piece to see if the king would be in check
			if (this.window.board.fieldInCheck(castlingField, player)) {
				castlingFieldInCheck = true;
			}
			castlingField.removePiece(tempPiece); // Remove temporary piece
			return castlingFieldInCheck;
		}
	}