private Game(IPlayer player, IRenderer renderer, IScoreBoardObserver scoreboard, LabyrinthProcesor processor) { this.renderer = renderer; this.player = player; this.scoreBoardHandler = scoreboard; this.processor = processor; }
static void Main(string[] args) { LabyrinthProcesor processor = new LabyrinthProcesor(); while (true) { ShowLabyrinth(processor.Matrix); processor.ShowInputMessage(); String input; input = Console.ReadLine(); processor.HandleInput(input); } }
public static Game Instance(IPlayer player, IRenderer renderer, IScoreBoardObserver scoreboard, LabyrinthProcesor processor) { if (gameInstance == null) { lock (syncLock) { if (gameInstance == null) { gameInstance = new Game(player, renderer, scoreboard, processor); } } } return gameInstance; }