playgameservices / android-basic-samples

Google Play game services - Android samples
Apache License 2.0
973 stars 970 forks source link

Players list has more elements than expected if addInvitedPlayers not called #291

Open jorgelamb opened 5 years ago

jorgelamb commented 5 years ago

Hi,

When creating a new TurnBasedMatch game (Games.TurnBasedMultiplayer.createMatch()) with a TurnBasedMatchConfig that hasn't been called to addInvitedPlayers the number of players in the TurnBasedMatch is incorrect.

We were trying to create a game with just 2 auto-match players, but the players array had 5 Player elements.

If we call TurnBasedMatchConfig.addInvitedPlayers(new ArrayList()) then it works ok: getPlayers() returns a 3 Player array.

Regards, Jorge