public Game(IGameConfigurator congigurator, IGameView view) { IsStarted += view.GameAction; IsMoveEnded += view.MoveAction; _robots = congigurator.GetRobots(); _field = congigurator.GetField(); foreach (var robot in _robots) { robot.MoveIsMaked += view.RobotAction; } }
public void GameInitialize(IGameConfigurator configurator) { GameDef = configurator.GameDef; CurTeamTurn = GameTeam.White; foreach (var controlByTeam in configurator.ControlsByTeam) { var team = controlByTeam.Key; var control = controlByTeam.Value; ControlsByTeam.Add(team, control); } }
public ConfigurationViewModel(IGameConfigurator gameConfigurator, IMapConfigurator mapConfigurator, INavigationService navigationService) { if (gameConfigurator == null) throw new ArgumentNullException(nameof(gameConfigurator)); if (mapConfigurator == null) throw new ArgumentNullException(nameof(mapConfigurator)); if (navigationService == null) throw new ArgumentNullException(nameof(navigationService)); this.mapConfigurator = mapConfigurator; this.gameConfigurator = gameConfigurator; this.navigationService = navigationService; _createLobbyCommand = new RelayCommand(CreateLobby, () => CanCreateLobby); }
public void GameInitialize(IGameConfigurator configurator) { BoardTileCreator.OnCreated += OnCreatedHandler; }
public void CantBeConstructedWithNull(IGameConfigurator gameconfig, IMapConfigurator mapconfig, INavigationService navigation) { Assert.Throws<ArgumentNullException>(() => new ConfigurationViewModel(gameconfig, mapconfig, navigation)); }
public void StartGame(IGameConfigurator gameConfigurator) { Array.ForEach(ComponentsInitializable, component => component.GameInitialize(gameConfigurator)); Array.ForEach(ComponentsStarting, component => component.GameStarting()); }
public void GameInitialize(IGameConfigurator configurator) { _isPause = true; _boardTileGenerator = configurator.GameDef.BoardTileGenerator; }
public void GameInitialize(IGameConfigurator configurator) { LootModel.OnAddedEntity += OnAddedEntityHandler; }
public void StartGame(IGameConfiguratorData configuratorData) { _curConfigurator = GameConfiguratorCreator.Create(configuratorData); StartGame(_curConfigurator); }
public void GameInitialize(IGameConfigurator configurator) { _gameDef = configurator.GameDef; PlayerBallDef = configurator.PlayerBallDef; }