ADD modifying display of the tiles remaining for each player | ADD sun

rule in game when a tile is placed on a sun
master
Mathis 2022-06-05 19:30:33 +02:00
parent 6432393147
commit b7da0b39d7
2 changed files with 12 additions and 0 deletions

View File

@ -637,6 +637,13 @@ public class LaticeApplicationWindow extends Application {
tileDropped = true;
freeOrPayableTile = false;
System.out.println("tuile posé!");
if (referee.sunRule(board, player.getRack().getListRackTile().get(indexTileClicked))) {
System.out.println("Vous avez gagné 2 points en mettant votre tuile sur un soleil");
playerFX.setAddScore(player, 2);
}
}
}
}
@ -701,6 +708,7 @@ public class LaticeApplicationWindow extends Application {
//setDragnDropOnRectangles(rect, board, referee, player);
borderPane.setBottom(rackImage);
tileDropped = false;
playerFX.setTilesRemaining(player);
}
}

View File

@ -64,6 +64,10 @@ public class PlayerFX {
this.score.setText("Score : " + player.getScore());
}
public void setTilesRemaining(Player player) {
this.nbrOfTiles.setText("Tuiles restantes : " + player.getNumberOfTilesRemaining());
}
}