/// <summary> /// Returns a Skillz Match Object /// </summary> public static Match GetMatchInfo() { if (_matchInfo == null) { string matchInfo = Marshal.PtrToStringAnsi(_getMatchInfo()); Dictionary <string, object> matchInfoDict = DeserializeJSONToDictionary(matchInfo); _matchInfo = new Match(matchInfoDict); } return(_matchInfo); }
/// <summary> /// Call this method when a player finishes a multiplayer game. This will report the result of the game /// to the Skillz server, and return the player to the Skillz portal. /// </summary> /// /// <param name="score">A float representing the score a player achieved in the game.</param> public static void FinishTournament(float score) { _displayTournamentResultsWithFloatScore(score); _matchInfo = null; }
/// <summary> /// Call this method when a player finishes a multiplayer game. This will report the result of the game /// to the Skillz server, and return the player to the Skillz portal. /// </summary> /// /// <param name="score">A string representing the score a player achieved in the game.</param> public static void FinishTournament(string score) { _displayTournamentResultsWithStringScore(score); _matchInfo = null; }
/// <summary> /// Call this method to make the player forfeit the game, returning him to the Skillz portal. /// </summary> public static void AbortGame() { _notifyPlayerAbortWithCompletion(); _matchInfo = null; }