added an getter for the error id in the IncorrectrequestMessage and implemeted how to handle it in the client game logic.

This commit is contained in:
Hanno Fleischer
2024-12-05 21:11:40 +01:00
parent f2c34aee2d
commit 1214d3c87c
2 changed files with 10 additions and 1 deletions

View File

@@ -413,7 +413,7 @@ public void received(ShutdownMessage msg) {
*/
@Override
public void received(IncorrectRequestMessage msg) {
state.received(msg);
addNotification(new InfoNotification(Resources.stringLookup("incorrect.request." + msg.getId())));
}
/**

View File

@@ -27,6 +27,15 @@ public IncorrectRequestMessage() {
this.id = 0;
}
/**
* Returns the id of the incorrect request message
*
* @return the id of the error message
*/
public int getId(){
return id;
}
/**
* Accepts a visitor to process this message.
*