Example #1
0
        public async Task <bool> Rematch(string matchId, string username, bool isTwitterUser)
        {
            var request = new RematchRequest()
            {
                MatchId       = matchId,
                Username      = username,
                TwitterLogged = isTwitterUser
            };

            using var stream = _multiplayerGameManagerClient.Rematch(request);
            while (await stream.ResponseStream.MoveNext(CancellationToken.None))
            {
                var response = stream.ResponseStream.Current;
                if (response.HasStarted)
                {
                    return(true);
                }
            }

            return(false);
        }