Skip to content

Commit

Permalink
✅ TCR - tests passing
Browse files Browse the repository at this point in the history
changed-lines:
    src: 8
    test: 0
test-stats:
    run: 2
    passed: 2
    failed: 0
    skipped: 0
    error: 0
    duration: 76ms
  • Loading branch information
David FRANCK committed Feb 21, 2024
1 parent 0ac9ab1 commit 88b52f1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.LinkedList;

public class Game {
ArrayList players = new ArrayList();
ArrayList<Player> players = new ArrayList();
int[] places = new int[6];
int[] purses = new int[6];
boolean[] inPenaltyBox = new boolean[6];
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 88b52f1

Please sign in to comment.