From 88b52f16c1b6eefab470078e14a17ae68259bfe1 Mon Sep 17 00:00:00 2001 From: David FRANCK Date: Wed, 21 Feb 2024 14:42:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20TCR=20-=20tests=20passing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit changed-lines: src: 8 test: 0 test-stats: run: 2 passed: 2 failed: 0 skipped: 0 error: 0 duration: 76ms --- .../main/java/com/adaptionsoft/games/uglytrivia/Game.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/src/main/java/com/adaptionsoft/games/uglytrivia/Game.java b/java/src/main/java/com/adaptionsoft/games/uglytrivia/Game.java index b27ed1bc5..ef0e05d24 100644 --- a/java/src/main/java/com/adaptionsoft/games/uglytrivia/Game.java +++ b/java/src/main/java/com/adaptionsoft/games/uglytrivia/Game.java @@ -4,7 +4,7 @@ import java.util.LinkedList; public class Game { - ArrayList players = new ArrayList(); + ArrayList players = new ArrayList(); int[] places = new int[6]; int[] purses = new int[6]; boolean[] inPenaltyBox = new boolean[6]; @@ -35,7 +35,7 @@ public boolean isPlayable() { } public boolean add(Player playerName) { - players.add(playerName.getName()); + players.add(playerName); places[getNbPlayers()] = 0; purses[getNbPlayers()] = 0; inPenaltyBox[getNbPlayers()] = false; @@ -85,8 +85,8 @@ public void roll(int roll) { } - private Object getCurrentPLayerName() { - return players.get(currentPlayer); + private String getCurrentPLayerName() { + return players.get(currentPlayer).getName(); } private void askQuestion() {