<commit_before>package de.hshannover.operation_muehle;

import java.util.HashMap;

import de.hshannover.operation_muehle.logic.SaveState;
import de.hshannover.operation_muehle.logic.Slot;
import de.hshannover.operation_muehle.logic.Move;
import de.hshannover.operation_muehle.logic.Player;
import de.hshannover.operation_muehle.logic.ApplicationController;
import de.hshannover.operation_muehle.logic.IOOperation;
import de.hshannover.operation_muehle.utils.loader.StrategyLoader;

/**
 * Facade for GUI-Interaction
 * @author <NAME>
 */
public class Facade {
	private static Facade instance;
	private ApplicationController appController;
	private StrategyLoader stratload;
	
	/**
	 * Simple Constructor.
	 */
	private Facade() {
		appController = new ApplicationController();
		stratload = new StrategyLoader();
	}
	
	/**
	 * Creates a Facade if not existent, otherwise returning
	 * the existing one.
	 * @return The Facade(SIngelton)
	 */
	static Facade getInstance() {
		if (instance == null) {instance = new Facade(); }
		return instance;
	}
	
	/**
	 * Starts a new Game with the given Options.
	 * @param gameOptions The Options.
	 * @see GUIController
	 */
	public void newGame(HashMap gameOptions) {
		appController.initializeNew(gameOptions);
		appController.playGame();
	}
	
	/**
	 * Saves the Game at the given Path
	 * @param path The path, where the game is to be saved.
	 * @see IOOperation
	 */<commit_msg>Made Facade.getInstance() public. Finally.<commit_after>package de.hshannover.operation_muehle;

import java.util.HashMap;

import de.hshannover.operation_muehle.logic.SaveState;
import de.hshannover.operation_muehle.logic.Slot;
import de.hshannover.operation_muehle.logic.Move;
import de.hshannover.operation_muehle.logic.Player;
import de.hshannover.operation_muehle.logic.ApplicationController;
import de.hshannover.operation_muehle.logic.IOOperation;
import de.hshannover.operation_muehle.utils.loader.StrategyLoader;

/**
 * Facade for GUI-Interaction
 * @author <NAME>
 */
public class Facade {
	private static Facade instance;
	private ApplicationController appController;
	private StrategyLoader stratload;
	
	/**
	 * Simple Constructor.
	 */
	private Facade() {
		appController = new ApplicationController();
		stratload = new StrategyLoader();
	}
	
	/**
	 * Creates a Facade if not existent, otherwise returning
	 * the existing one.
	 * @return The Facade(SIngelton)
	 */
	public static Facade getInstance() {
		if (instance == null) {instance = new Facade(); }
		return instance;
	}
	
	/**
	 * Starts a new Game with the given Options.
	 * @param gameOptions The Options.
	 * @see GUIController
	 */
	public void newGame(HashMap gameOptions) {
		appController.initializeNew(gameOptions);
		appController.playGame();
	}
	
	/**
	 * Saves the Game at the given Path
	 * @param path The path, where the game is to be saved.
	 * @see IOOperation
	 */
{'fraction_non_alphanumeric': 0.10111188325225852, 'fraction_numerical': 0.0, 'mean_word_length': 4.411654135338346, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2486227', 'n_tokens_mistral': 973, 'n_tokens_neox': 911, 'n_words': 226}