Example #1
0
        public void InvokeState()
        {
            var level     = levelFactory.CreateLevel();
            var inputLoop = new InputLoop();
            var playView  = new ConsolePlayView();

            var moveInteractor     = new MoveInteractor(level, playView);
            var exitGameInteractor = new ExitGameInteractor(inputLoop);

            var moveProcessor     = new MoveProcessor(moveInteractor);
            var exitGameProcessor = new ExitGameProcessor(exitGameInteractor);

            var keyboardController = new KeyboardController();

            keyboardController.AddInputProcessor(moveProcessor);
            keyboardController.AddInputProcessor(exitGameProcessor);

            inputLoop.AddUpdatable(keyboardController);

            playView.Draw(level);
            inputLoop.Start();
        }
Example #2
0
 public MoveProcessor(MoveInteractor moveInteractor)
 {
     this.moveInteractor = moveInteractor;
 }