ADD modifying display of the tiles remaining for each player | ADD sun
rule in game when a tile is placed on a sunmaster
parent
6432393147
commit
b7da0b39d7
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue