public static void Main() { var consoleUI = new ConsoleUI(); var commandFactory = new CommandFactory(); var gameLogicProvider = new GameLogic(MatrixValidator.GetInstance); var gameModel = new Game(gameLogicProvider); var engine = new Engine(consoleUI, UserInputValidator.GetInstance, commandFactory, gameModel, gameLogicProvider); engine.Run(); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var graphicUi = new MainWindow(); var factory = new CommandFactory(); var validator = MatrixValidator.GetInstance; var logicProvider = new GameLogic(validator); var model = new Game(logicProvider); this.engine = new GraphicEngine(graphicUi, UserInputValidator.GetInstance, factory, model, logicProvider); graphicUi.Show(); }