Skip to content

Commit

Permalink
Debug score added
Browse files Browse the repository at this point in the history
  • Loading branch information
Mimi8298 committed Nov 18, 2021
1 parent 6616a7d commit 964cb86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void execute(Game game) {
GameTurn turn = game.getTurn();

chunk.setMeeple(new Meeple(player));
player.addScore(1, chunk.getType());
player.removeRemainingMeepleCount();
turn.setMeeplePlaced();

Expand Down
2 changes: 1 addition & 1 deletion carcassonne-logic/src/main/java/logic/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void addScore(int value, ChunkType chunkType) {
*/
public int compareTo(Object compareTo) {
Player compareToEmp = (Player) compareTo;
return Integer.compare(id, compareToEmp.getScore());
return Integer.compare(getScore(), compareToEmp.getScore());
}

public int getRoadPoints() {
Expand Down

0 comments on commit 964cb86

Please sign in to comment.