public async Task UpdateVoteOptionsForRoom(HostVoteOptions hostVoteOptions) { if (hostVoteOptions == null) { return; } await chaosGameManager.SetNewVoteOptions(hostVoteOptions); }
public async Task SetNewVoteOptions(HostVoteOptions hostVoteOptions) { if (hostVoteOptions == null || !hostVoteOptions.VoteOptions.Any()) { return; } if (!_games.TryGetValue(hostVoteOptions.RoomCode, out var game)) { return; } await game.SetNewVoteOptions(hostVoteOptions.VoteOptions.Select((vo, i) => new VoteOption { ChaosId = vo.ChaosId, Description = vo.Description, Id = i }).ToArray()); }