Corrigé bug dans l'ajout de parties

This commit is contained in:
Yohann D'ANELLO 2019-12-06 17:24:58 +01:00
parent 9388b57447
commit 04279833bd
1 changed files with 7 additions and 2 deletions

View File

@ -548,8 +548,13 @@ public class NewGameFragment extends Fragment {
for (int i = 0; i < game.getGameType().getNbPlayers(); ++i) for (int i = 0; i < game.getGameType().getNbPlayers(); ++i)
players.get(i).addScore(game.getGameType(), game.getPoints(players.get(i))); players.get(i).addScore(game.getGameType(), game.getPoints(players.get(i)));
for (int i = 0; i < 6; ++i) MainActivity.INSTANCE.runOnUiThread(new Runnable() {
totalPoints[i].setText(String.valueOf(((Player) spinners[i].getSelectedItem()).getScore(Game.GameType.values()[nb_players.getProgress()]))); @Override
public void run() {
for (int i = 0; i < 6; ++i)
totalPoints[i].setText(String.valueOf(((Player) spinners[i].getSelectedItem()).getScore(Game.GameType.values()[nb_players.getProgress()])));
}
});
return game; return game;
} }