mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Merge pull request #2968 from ingmargoudt/singleton-as-enum
rewrote singleton to enum where applicable
This commit is contained in:
commit
68d398c6fb
909 changed files with 1935 additions and 2292 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue