From 3505c7a97a38b4f07070701d8f78b3b10b28a4fb Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 5 Dec 2019 17:32:40 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20points=20totaux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java b/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java index 0e7d3f9..022701f 100644 --- a/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java +++ b/app/src/main/java/fr/ynerant/tarot/ui/newgame/NewGameFragment.java @@ -541,6 +541,12 @@ public class NewGameFragment extends Fragment { game.setMiseries(miseriesList); game.calculateScores(); + for (int i = 0; i < game.getGameType().getNbPlayers(); ++i) + players.get(i).addScore(game.getGameType(), game.getPoints(players.get(i))); + + 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; } });