public void saveLevel(Board board) throws LevelMisconfigurationException {
		// the parent folder where the file is created inside
		File parentFolder = new File(
				CoreConstants.getProperty("editor.basepath"));

		/**
		 * start to validate level configuration
		 */

		// list with positions of all diamonds
		List<Position> diamondPosList = board
				.getPositionsOfType(FieldState.DIAMOND);

		// list with positions of all goals
		List<Position> goalPosList = board.getPositionsOfType(FieldState.GOAL);

		// initialize dijkstra algorithm for this board
		Dijkstra dijkstra = new Dijkstra(board.getGrid(), Mode.EDITOR);

		/**
		 * check if all diamonds have a connection to any goal
		 */
		boolean diamondToGoals = checkConnections(dijkstra, diamondPosList,
				goalPosList);

		/**
		 * check if all goals have a connection to any diamond
		 */
		boolean goalToDiamonds = checkConnections(dijkstra, goalPosList,
				diamondPosList);

		if (!diamondToGoals) {
			LOG.error("Error in saving level: diamond without connection to goal!");
			throw new LevelMisconfigurationException(
					"Fehler: Es gibt einen Diamanten ohne Verbindung zu einem Ziel!");
		}

		if (!goalToDiamonds) {
			LOG.error("Error in saving level: goal without connection to diamond!");
			throw new LevelMisconfigurationException(
					"Fehler: Es gibt ein Ziel ohne Verbindung zu einem Diamanten!");
		}

		/**
		 * prevent to save a modified level with the same uuid again when a
		 * level is changed in the editor, then it needs a new uuid
		 */
		board.setUuid(null);

		/**
		 * now save the level to xml, everything should be valid
		 */
		XmlService.getInstance().saveLevel(board, parentFolder);
	}