ios - Starting the first turn of Turn Based Game Center game -


I have a game on which I am working, which is closely based between 2 players. I am somewhat confused how to send the order of the player if this is the first round and a player has not got it yet. NextNext Reader: (NSArray *) NextPreditorsTurnTimeout: (NSTimeInterval) Timeout MatchData: (NSDTA *) MatchData ClosingHandler: (Zero (^) (NSERR * Error)) ClosingHandler

This is always a match for the local player, findMatchForRequest: withCompletionHandler: is specified in the form.

How the player is kept in the match regardless, the local player is always the current participant in the returned match.

For more specifically your question, matchData property will be zero in case of match object where the local player Was not yet matched. Since you will assign matchData before the turn, the other player will see data instead of zero .

By the design of the game center- based match structure, you do not control the player's order. If findMatchForRequest: withCompletionHandler: finds a match in which someone has already made a turn, you are second if it finds an empty match, then you are the first one.


Comments