public async Task <Tactic> LoadTacticAsync() { currentTactic = await tacticsService.GetAsync(); SetState(TacticState.InProgress); LoadFrom(currentTactic.fenBefore); return(currentTactic); }
public async Task <Tactic> GetAsync() { string token = await getToken; var payload = new { token, type = "explore" }; var response = await client.PostAsync("blunder/get", GetPayloadContent(payload)); var responseString = await response.Content.ReadAsStringAsync(); TacticResponse <Tactic> tacticsResponse = JsonConvert.DeserializeObject <TacticResponse <Tactic> >(responseString); currentTactic = tacticsResponse.data; currentTactic.Info = await GetInfoAsync(currentTactic.id); return(currentTactic); }