示例#1
0
        public async Task Create(string id)
        {
            var existingPlayer = await Exists(id);

            if (existingPlayer)
            {
                // TODO: create app specific exception and handle at a higher level
                // ex:  PlayerExistsException(playerId)
                throw new Exception("Player already exists!");
            }
            await _client.CreatePlayer(_game.GameId, id);
        }