public GamesController(IGameServices gameServices, IGenreServices genreServices, ICommentsServices commentsServices, IPlatformServices platformServices) { comments = commentsServices; games = gameServices; genres = genreServices; platforms = platformServices; }
private void Awake() { _dataProvider = MainInstaller.Resolve <IGameDataProvider>(); _services = MainInstaller.Resolve <IGameServices>(); _timer.Init(_services); }
public void Setup() { repo = new Mock <IRepository>(); IOptions <GameSettings> options = _provider.GetService <IOptions <GameSettings> >(); service = new GameServices(repo.Object, options); gameSettings = options.Value; }
public GameDeleteModel( IGameServices gameService, IStorageService storageService) { _gameService = gameService; _storageService = storageService; }
public InitialLoadingState(IGameLogicInit gameLogic, IGameServices services, IGameUiServiceInit uiService, IConfigsAdder configsAdder, IDataService dataService) { _gameLogic = gameLogic; _services = services; _uiService = uiService; _configsAdder = configsAdder; _dataService = dataService; }
// AppLog is always first service added so other services can log initialization errors public static ServiceManager Instantiate(IAppLog appLog) { if (GameServices != null) { throw new System.Exception("Trying to instantiate ServiceManager more than once"); } GameServices = new ServiceManager(appLog); return((ServiceManager)GameServices); }
/// <summary> /// Initializes the view to start it's update loop. /// </summary> /// <exception cref="InvalidOperationException"> /// Thrown if is called more than one time for the same entity GameObject /// </exception> public void Init(IGameServices services) { if (_services != null) { throw new InvalidOperationException("The Timer View was already initialized"); } _services = services; _services.TickService.SubscribeOnUpdate(UpdateTime, 1, true, true); }
public void AddService <T>(IGameServices service) { if (service is T) { _services.Add(typeof(T), service); } else { throw new Exception("Service " + service + " have not implemented interface "); } }
public MatchSession(IGameServices services, int line, int column, Vector2 boardSize) { this.services = services; this.line = line; this.column = column; board = new Piece[line, column]; behaviour = new MatchBehaviour(board, boardSize); behaviour.InitialPieces(); }
public void ShouldCreateDeck() { //Arrange _gameServices = new GameServices(); //Act var deck = _gameServices.CreateDeck(); //Assert Assert.IsNotNull(deck); Assert.IsNotNull(deck.Cards); Assert.AreEqual(deck.Cards.Count, _gameServices.GameSettings.NumberOfCards); }
public GameCreateModel( IGameServices gameService, IStorageService storageService, ICategoryServices categoryService, IGenreServices genreService, IModeServices modeService, IPlatformServices platformService) { _gameService = gameService; _storageService = storageService; _categoryService = categoryService; _genreService = genreService; _modeService = modeService; _platformService = platformService; }
public void ShouldShuffleDeck() { //Arrange _gameServices = new GameServices(); //Act var deck = _gameServices.CreateDeck(); var card1 = deck.Cards[0]; var shuffledDeck = _gameServices.ShuffleDeck(deck); var card2 = shuffledDeck.Cards[0]; //Assert Assert.That(() => _gameServices.ShuffleDeck(null), Throws.ArgumentException); Assert.That(() => _gameServices.ShuffleDeck(new Deck()), Throws.ArgumentException); Assert.AreNotEqual(card1, card2); }
public void ShouldCreateCardGame() { //Arrange _gameServices = new GameServices(); //Act int specifiedRounds = 3; var deck = _gameServices.CreateDeck(); var shuffledDeck = _gameServices.ShuffleDeck(deck); var game = _gameServices.CreateCardGame(2, shuffledDeck, null); var gameWithSpecifiedRounds = _gameServices.CreateCardGame(5, shuffledDeck, specifiedRounds); //Assert Assert.That(() => _gameServices.CreateCardGame(0, shuffledDeck, null), Throws.ArgumentException); Assert.That(() => _gameServices.CreateCardGame(1000, shuffledDeck, null), Throws.ArgumentException); Assert.That(() => _gameServices.CreateCardGame(2, null, null), Throws.ArgumentException); Assert.That(() => _gameServices.CreateCardGame(2, new Deck(), null), Throws.ArgumentException); Assert.IsNotNull(game); Assert.AreEqual(game.RoundsCount, _gameServices.GameSettings.NumberOfCards / game.PlayersCount); Assert.AreEqual(gameWithSpecifiedRounds.RoundsCount, specifiedRounds); }
public GameHub(IGameServices gameServices) : base() { _gameServices = gameServices; }
public LeaderboardController(IMemberServices memberServices, IGameServices gameServices) : base(memberServices, gameServices) { }
public GameController(IHubContext <GameHub> hubContext) { _services = new GameService(); _hubContext = hubContext; }
public GamesModel(IGameServices gameService) { _gameService = gameService; }
private void Awake() { _services = MainInstaller.Resolve <IGameServices>(); }
public GameController(IGameServices gameServices) { _gameServices = gameServices; }
public GameController(IGameServices gameService) { _gameService = gameService; }
public GamesController(IGameServices services, IWebHostEnvironment hostingEnvironment) { _services = services; _hostingEnvironment = hostingEnvironment; }
public InterfacesController(IMemberServices memberServices, IGameServices gameServices) : base(memberServices, gameServices) { }
public CRUD_GameMethods(IGameServices services) { _services = services; }
public GamesApiController(ILogger <GamesApiController> logger, IGameServices gamesServices) : base(logger) { _logger = logger; _gamesServices = gamesServices; }
public GameController(IGameServices _gameServices) { gameService = _gameServices; }
public GameDetailsModel(IGameServices gameService) { _gameService = gameService; }
public GamesApplication(IGameServices gameService) : base() => this.gameService = gameService;
public GameplayState(IGameServices services, IGameUiService uiService, Action <IStatechartEvent> statechartTrigger) { _services = services; _uiService = uiService; _statechartTrigger = statechartTrigger; }
public CRUD_GameMethods() { _services = new GameServices(); }
public GamesController(IGameServices services) { _services = services; }