Set winner after turn based game Google API Android -


i'm creating turn based game on android platform using api provided google. @ end of latest turn (in case third one), i'd set winner have not found api permits this. naturally have data @ end of game set it.

i've not read in documentation - feature exist or should handle myself?

string playerid = games.players.getcurrentplayerid(getapiclient()); string myoponentid = mmatch.getparticipantid(playerid);  opponentresult = new participantresult(myoponentid,                     participantresult.match_result_win, 1);             creatorresult = new participantresult(playerid,                     participantresult.match_result_loss, 2);  games.turnbasedmultiplayer.finishmatch(getapiclient(), mmatch.getmatchid(),mmatch.getdata(), creatorresult,opponentresult )                 .setresultcallback(new resultcallback<turnbasedmultiplayer.updatematchresult>() {                     @override                     public void onresult(turnbasedmultiplayer.updatematchresult result) {                         processresult(result);                     }                 }); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -