我正在开展多人纸牌游戏。
使用此代码播放器添加新匹配:
-(void)addNewMatch {
NSLog(@"addNewMatch");
GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.maxPlayers = 2;
request.minPlayers = 2;
[GKTurnBasedMatch findMatchForRequest:request withCompletionHandler:^(GKTurnBasedMatch *match, NSError *error) {
if (error) {
NSLog(@"%@", error.localizedDescription );
} else {
NSLog(@"match found!");
[self.vc dismissViewControllerAnimated:YES completion:nil];
[[GCTurnBasedMatchHelper sharedInstance] turnBasedMatchmakerViewController:nil didFindMatch:match];
}
}];
}
如何列出其他玩家的所有有效比赛(房间)?