Пример #1
0
        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();
        }
Пример #2
0
        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();
        }
Пример #3
0
 public GameLogicTests()
 {
     this.gameLogicProvider = new GameLogic(MatrixValidator.GetInstance);
 }
Пример #4
0
 public Game(GameLogic gameLogicProvider)
 {
     this.gameLogicProvider = gameLogicProvider;
     this.Reset();
 }
Пример #5
0
 public Game(GameLogic gameLogicProvider)
 {
     this.gameLogicProvider = gameLogicProvider;
     this.Reset();
 }