コード例 #1
0
        public void Setup()
        {
            _mockedGameModel = new Mock <IGameModel>();
            _testNpc         = new NonPlayableCharacter(MoveDirection.Down);

            _testMap = TestMapGenerator.GenerateMap(_testNpc);

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

            _npcToDownMover = new NpcToDownMover(_mockedGameModel.Object, new PositionFinder(), new NpcTurner());
        }
コード例 #2
0
        public void Setup()
        {
            _testPlayer = new PlayerDto()
            {
                Name = "Jani", EntityType = EntityType.PlayerOne
            };

            _testMap = TestMapGenerator.GenerateMap(_testPlayer);

            _positionFinder = new PositionFinder();
        }
コード例 #3
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);
        }