public PlayerServiceImpl() { lock = new ReentrantReadWriteLock(true); // gameType = new SnakeGame(); gameType = new BombermanGame(); // gameType = new MinesweeperGame(); // gameType = new BattlecityGame(); decoder = new GuiPlotColorDecoder(gameType.getPlots()); }
// for testing void setGameType(GameType gameType, GameSaver saver) { this.gameType = gameType; this.saver = saver; decoder = new GuiPlotColorDecoder(gameType.getPlots()); }