android-basic-samples icon indicating copy to clipboard operation
android-basic-samples copied to clipboard

TurnBasedMatch.getLastUpdaterId() not always correct

Open TroelsN opened this issue 8 years ago • 0 comments

I have a problem where TurnBasedMatch.getLastUpdaterId() returns the ID of the inviting player p1, even though the last update was performed by player p2:

Steps to reproduce:

  • Participant p1 calls Games.TurnBasedMultiplayer.createMatch(..)
  • In the InitiateMatchResult callback p1 calls TakeTurn with null game data and passes the turn to participant p2.
  • participant p2 calls Games.TurnBasedMultiplayer.acceptInvitation(..)
  • In the InitiateMatchResult callback p2 calls TakeTurn with real game data (to set up the initial game conditions) and passes the turn to himself (in order to persist the game and let p2 take the first real turn).
  • In the UpdateMatchResult callback p2 retrieves the TurnBasedMatch and calls getLastUpdaterId() which returns p1.

TroelsN avatar Nov 15 '15 17:11 TroelsN