public void Start() { if (State == MatchState.Ready) { _broadcastHandler.BroadcastConfiguration(_mode.GetConfiguration()); State = MatchState.Loading; } }
public Game(IEnumerable<User> players, IGameMode mode, BroadcastHandler broadcastHandler, Action onFinish) { _mode = mode; _gameConfiguration = _mode.GetConfiguration(); _broadcastHandler = broadcastHandler; _map = new Map(_gameConfiguration.MapConfig); var cycleDictionary = createCycles(players); _onFinish = onFinish; _cycleManager = new CycleManager(cycleDictionary); _map.RegisterCycles(cycleDictionary); _broadcastHandler.RegisterCycles(cycleDictionary); CommandHandler = new CommandHandler(cycleDictionary); }
public Game(IEnumerable <User> players, IGameMode mode, BroadcastHandler broadcastHandler, Action onFinish) { _mode = mode; _gameConfiguration = _mode.GetConfiguration(); _broadcastHandler = broadcastHandler; _map = new Map(_gameConfiguration.MapConfig); var cycleDictionary = createCycles(players); _onFinish = onFinish; _cycleManager = new CycleManager(cycleDictionary); _map.RegisterCycles(cycleDictionary); _broadcastHandler.RegisterCycles(cycleDictionary); CommandHandler = new CommandHandler(cycleDictionary); }