public TurnBasedRound(JSONDict dict) { OpponentRoundScore = dict.SafeGetDoubleValue("opponentScore"); MyRoundScore = dict.SafeGetDoubleValue("playerScore"); uint?roundOutcome = dict.SafeGetUintValue("roundOutcome"); if (roundOutcome == null) { Outcome = SkillzSDK.TurnBasedRoundOutcome.NoOutcome; } else { switch (roundOutcome) { case 0: Outcome = SkillzSDK.TurnBasedRoundOutcome.Loss; break; case 1: Outcome = SkillzSDK.TurnBasedRoundOutcome.Win; break; case 2: Outcome = SkillzSDK.TurnBasedRoundOutcome.Draw; break; case 4: default: Outcome = SkillzSDK.TurnBasedRoundOutcome.NoOutcome; break; } } }
public TurnBasedRound(JSONDict dict) { OpponentRoundScore = dict.SafeGetDoubleValue("opponentScore"); MyRoundScore = dict.SafeGetDoubleValue("playerScore"); uint? roundOutcome = dict.SafeGetUintValue("roundOutcome"); if (roundOutcome == null) { Outcome = SkillzSDK.TurnBasedRoundOutcome.NoOutcome; } else { switch (roundOutcome) { case 0: Outcome = SkillzSDK.TurnBasedRoundOutcome.Loss; break; case 1: Outcome = SkillzSDK.TurnBasedRoundOutcome.Win; break; case 2: Outcome = SkillzSDK.TurnBasedRoundOutcome.Draw; break; case 4: default: Outcome = SkillzSDK.TurnBasedRoundOutcome.NoOutcome; break; } } }