/// <summary> /// Completes a turn for a turn-based game that has scores. /// </summary> /// /// <param name="gameData"> /// A Base64-encoded String object containing serialized data which can be used /// to reconstruct the game state for the next turn, or to review the current game state. This exact string /// will be part of the game data passed into the <code>OnTurnBasedTournamentWillBegin()</code> callback in SkillzDelegateTurnBased. /// </param> /// <param name="roundOutcome"> /// The outcome of this round. Each round is a set of two turns -- one for each player. /// Used in the UI to tell players which rounds they won. Particularly useful to Skillz for objective-based games (e.x. Chess). /// </param> /// <param name="matchOutcome">The outcome of the whole match. If it's something other than SkillzRoundNoOutcome, the match will end after this turn.</param> /// <param name="playerTurnScore"> /// A nice string representation of the player's score for this turn. /// </param> /// <param name="playerTotalScore">The total score for the current player.</param> /// <param name="opponentTotalScore">The total score for the current player's opponent.</param> public static void FinishTurn(string gameData, TurnBasedRoundOutcome roundOutcome, TurnBasedMatchOutcome matchOutcome, string playerTurnScore, float playerTotalScore, float opponentTotalScore) { _completeTurnWithGameData(gameData, playerTurnScore, playerTotalScore, opponentTotalScore, "SkillzRound" + roundOutcome.ToString(), "SkillzMatch" + matchOutcome.ToString()); }
/// <summary> /// Completes a turn for a turn-based game that has scores. /// </summary> /// /// <param name="gameData"> /// A Base64-encoded String object containing serialized data which can be used /// to reconstruct the game state for the next turn, or to review the current game state. This exact string /// will be part of the game data passed into the <code>OnTurnBasedTournamentWillBegin()</code> callback in SkillzDelegateTurnBased. /// </param> /// <param name="roundOutcome"> /// The outcome of this round. Each round is a set of two turns -- one for each player. /// Used in the UI to tell players which rounds they won. Particularly useful to Skillz for objective-based games (e.x. Chess). /// </param> /// <param name="matchOutcome">The outcome of the whole match. If it's something other than SkillzRoundNoOutcome, the match will end after this turn.</param> /// <param name="playerTurnScore"> /// A nice string representation of the player's score for this turn. /// </param> /// <param name="playerTotalScore">The total score for the current player.</param> /// <param name="opponentTotalScore">The total score for the current player's opponent.</param> public static void FinishTurn(string gameData, TurnBasedRoundOutcome roundOutcome, TurnBasedMatchOutcome matchOutcome, string playerTurnScore, float playerTotalScore, float opponentTotalScore) { _completeTurnWithGameData(gameData, playerTurnScore, playerTotalScore, opponentTotalScore, "SkillzRound" + roundOutcome.ToString(), "SkillzMatch" + matchOutcome.ToString()); }
/// <summary> /// Completes a turn for a turn-based game that doesn't have scores. /// </summary> /// /// <param name="gameData"> /// A Base64-encoded String object containing serialized data which can be used /// to reconstruct the game state for the next turn, or to review the current game state. This exact string /// will be part of the game data passed into the <code>OnTurnBasedTournamentWillBegin()</code> callback in SkillzDelegateTurnBased. /// </param> /// <param name="roundOutcome"> /// The outcome of this round. Each round is a set of two turns -- one for each player. /// Used in the UI to tell players which rounds they won. Particularly useful to Skillz for objective-based games (e.x. Chess). /// </param> /// <param name="matchOutcome">The outcome of the whole match. If it's something other than SkillzRoundNoOutcome, the match will end after this turn.</param> public static void FinishTurn(string gameData, TurnBasedRoundOutcome roundOutcome, TurnBasedMatchOutcome matchOutcome) { FinishTurn(gameData, roundOutcome, matchOutcome, null, float.NaN, float.NaN); }
/// <summary> /// Completes a turn for a turn-based game that doesn't have scores. /// </summary> /// /// <param name="gameData"> /// A Base64-encoded String object containing serialized data which can be used /// to reconstruct the game state for the next turn, or to review the current game state. This exact string /// will be part of the game data passed into the <code>OnTurnBasedTournamentWillBegin()</code> callback in SkillzDelegateTurnBased. /// </param> /// <param name="roundOutcome"> /// The outcome of this round. Each round is a set of two turns -- one for each player. /// Used in the UI to tell players which rounds they won. Particularly useful to Skillz for objective-based games (e.x. Chess). /// </param> /// <param name="matchOutcome">The outcome of the whole match. If it's something other than SkillzRoundNoOutcome, the match will end after this turn.</param> public static void FinishTurn(string gameData, TurnBasedRoundOutcome roundOutcome, TurnBasedMatchOutcome matchOutcome) { FinishTurn(gameData, roundOutcome, matchOutcome, null, float.NaN, float.NaN); }