public GameLogic(IPlayerToLeftMover playerToLeftMover, IPlayerToRightMover playerToRightMover, IPlayerToDownMover playerToDownMover, IPlayerToUpMover playerToUpMover, IBombHandler bombHandler)
        {
            _playerToLeftMover  = playerToLeftMover;
            _playerToRightMover = playerToRightMover;
            _playerToDownMover  = playerToDownMover;
            _playerToUpMover    = playerToUpMover;
            _bombHandler        = bombHandler;

            Messenger.Default.Register <NotificationMessage <Bomb> >(this, x => BombBlows(x.Content));
            Messenger.Default.Register <NotificationMessage <Flame> >(this, x => FlameBlows(x.Content));
        }
Beispiel #2
0
        public void Setup()
        {
            _mockedGameModel = new Mock <IGameModel>();

            _testMap = TestMapGenerator.GenerateMap(_testPlayer);

            _mockedGameModel.Setup(x => x.GetMap).Returns(_testMap);

            _playerToDownMover  = new PlayerToDownMover(_positionFinder, _mockedGameModel.Object);
            _playerToUpMover    = new PlayerToUpMover(_positionFinder, _mockedGameModel.Object);
            _playerToRightMover = new PlayerToRightMover(_positionFinder, _mockedGameModel.Object);
            _playerToLeftMover  = new PlayerToLeftMover(_positionFinder, _mockedGameModel.Object);
            _bombHandler        = new BombHandler(_positionFinder, _mockedGameModel.Object);

            _gameLogic = new GameLogic(_playerToLeftMover, _playerToRightMover, _playerToDownMover, _playerToUpMover, _bombHandler);
        }