public void Setup() { UseSubstituteLogging(); _useSubstitueGameManager = UseSubstitueGameManager(); _ballFactory = Substitute.For <IBallFactory>(); _ballGrid = new BallGrid(_ballFactory, new OrphanedBallFinder(), null); }
public void Setup() { UseSubstitueGameManager(); _mockBallFactory = Substitute.For <IBallFactory>(); _mockBallGrid = Substitute.For <IBallGrid>(); _gridPositionCalculator = Substitute.For <IBallGridPositionCalculator>(); _ballGridController = new BallGridController(_mockBallFactory, _mockBallGrid, _gridPositionCalculator); }
public StartBall( IBallFactory factory, IConsoleHandler console ) { _factory = factory; _console = console; }
public BallGrid(IBallFactory ballFactory, OrphanedBallFinder orphanedBallFinder, GameObject ballContainer) { _ballFactory = ballFactory; _activeBalls = new List <IBallController>(GRID_WIDTH * GRID_HEIGHT); _matchedBallSetFinder = new MatchedBallSetFinder(); _ballPositionHandler = new BallGridPositionHandler(); _orphanedBallFinder = orphanedBallFinder; _ballContainer = ballContainer; }
public BallGridController(IBallFactory ballFactory, IBallGrid ballGrid, IBallGridPositionCalculator gridPositionCalculator) { _ballFactory = ballFactory; _ballGrid = ballGrid; _gridPositionCalculator = gridPositionCalculator; var gameEventBus = GameManager.Instance.EventBus; gameEventBus.Subscribe <BallDestroyByGiantLaserEventArgs>(OnBallDestroyed); gameEventBus.Subscribe <BallCollisionEventArgs>(OnBallCollision); }
public PongGame(IGameInitializer gameInitializer, IPlayerInitializer playerInitializer, IPlayerFactory playerFactory, IBallFactory ballFactory, IBallInitializer ballInitializer) { this.gameInitializer = gameInitializer; this.playerInitializer = playerInitializer; this.playerFactory = playerFactory; this.ballFactory = ballFactory; this.ballInitializer = ballInitializer; Running = true; }
public GameInitializer(IPlayerInitializer playerInitializer, IBallFactory ballFactory, IBallInitializer ballInitializer) { this.playerInitializer = playerInitializer; this.ballFactory = ballFactory; this.ballInitializer = ballInitializer; }