mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
rewrote singleton to enum where applicable
This commit is contained in:
parent
3b62489ef5
commit
234cfe9519
872 changed files with 1796 additions and 2135 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