rewrote singleton to enum where applicable

This commit is contained in:
ingmargoudt 2017-03-14 16:31:57 +01:00
parent 3b62489ef5
commit 234cfe9519
872 changed files with 1796 additions and 2135 deletions

View file

@ -9,7 +9,7 @@ import java.util.UUID;
public class LoadPhaseManager {
private static final LoadPhaseManager fInstance = new LoadPhaseManager();
private static final LoadPhaseManager instance = new LoadPhaseManager();
public static String DEFAULT_PLAYER_NAME = "player";
@ -52,7 +52,7 @@ public class LoadPhaseManager {
}};
public static LoadPhaseManager getInstance() {
return fInstance;
return instance;
}
public boolean isSkip(GameView gameView, String message, UUID playerId) {

View file

@ -101,7 +101,7 @@ public abstract class MageTestBase {
logger.info("Starting MAGE tests");
logger.info("Logging level: " + logger.getLevel());
deleteSavedGames();
ConfigSettings config = ConfigSettings.getInstance();
ConfigSettings config = ConfigSettings.instance;
for (GamePlugin plugin : config.getGameTypes()) {
GameFactory.getInstance().addGameType(plugin.getName(), loadGameType(plugin), loadPlugin(plugin));
}

View file

@ -96,7 +96,7 @@ public abstract class MageTestPlayerBase {
logger.debug("Starting MAGE tests");
logger.debug("Logging level: " + logger.getLevel());
deleteSavedGames();
ConfigSettings config = ConfigSettings.getInstance();
ConfigSettings config = ConfigSettings.instance;
for (GamePlugin plugin : config.getGameTypes()) {
GameFactory.getInstance().addGameType(plugin.getName(), loadGameType(plugin), loadPlugin(plugin));
}