game: Added custom message for no villages left

This commit is contained in:
2023-05-01 15:08:42 +10:00
parent 0a4f729108
commit da5d6dbdff

View File

@@ -105,7 +105,14 @@ public class Game extends Application {
char typeC = 'S';
if (type == 1){
typeC = 'T';
if (currentGame.getCurrentPlayer().getVillages().length >= 5){
sendMessage("You have placed all your villages");
return;
}
}
if (currentGame.isMoveValid(selectedTile,typeC)){
currentGame.placePiece(selectedTile,typeC);
Player player = currentGame.getCurrentPlayer();