added the first error.messages and adjusted

This commit is contained in:
Fleischer Hanno
2024-12-02 20:24:17 +01:00
parent 2cefc2c293
commit 7ddcdc3f48
5 changed files with 35 additions and 13 deletions

View File

@@ -60,7 +60,7 @@ public class MdgaApp extends SimpleApplication {
private ServerConnection networkConnection;
private MdgaApp() {
public MdgaApp() {
networkConnection = new NetworkSupport(this);
this.clientGameLogic = new ClientGameLogic(networkConnection);
}

View File

@@ -63,9 +63,9 @@ public void selectUnready(){
@Override
public void selectStart(){
if(logic.isHost() && logic.getGame().allReady()){
if(logic.isHost() && logic.getGame().areAllReady()){
logic.send(new StartGameMessage(false));
} else if(logic.isHost() && !logic.getGame().allReady()) {
} else if(logic.isHost() && !logic.getGame().areAllReady()) {
logic.send(new StartGameMessage(true));
} else {
LOGGER.log(System.Logger.Level.ERROR, "You are not the host");

View File

@@ -145,16 +145,6 @@ public void received(LobbyReadyMessage msg, int from) {
return;
}
}
this.logic.getGame().setAllReady(true);
if (this.logic.getGame().allReady()) {
this.logic.getServerSender().broadcast(new StartBriefingMessage(this.logic.getGame().getBoard()));
this.initializeGame();
for (Map.Entry<Color, PlayerData> entry : logic.getGame().getBoard().getPlayerData().entrySet()) {
this.logic.getServerSender().broadcast(new PlayerDataMessage(entry.getValue(), entry.getKey()));
}
this.logic.getServerSender().broadcast(new ServerStartGameMessage());
}
}
/**

View File

@@ -0,0 +1,18 @@
incorrect.request.0=
incorrect.request.1=
incorrect.request.2=
incorrect.request.3=
incorrect.request.4=
incorrect.request.5=
incorrect.request.6=
incorrect.request.7=
incorrect.request.8=
incorrect.request.9=
incorrect.request.10=
incorrect.request.11=
incorrect.request.12=
incorrect.request.13=
incorrect.request.14=

View File

@@ -0,0 +1,14 @@
incorrect.request.1=Die ausgewählte TSK ist bereits belegt.
incorrect.request.2=Es gibt keine freie TSK mehr, welche ausgewählt werden kann.
incorrect.request.3=
incorrect.request.4=
incorrect.request.5=
incorrect.request.6=
incorrect.request.7=
incorrect.request.8=
incorrect.request.9=
incorrect.request.10=
incorrect.request.11=
incorrect.request.12=
incorrect.request.13=
incorrect.request.14=