Skip to content

Commit ecb183a

Browse files
committed
fix: sonar GUI
1 parent b9e9fb4 commit ecb183a

1 file changed

Lines changed: 18 additions & 13 deletions

File tree

  • src/main/java/it/polimi/ingsw/client/gui

src/main/java/it/polimi/ingsw/client/gui/GUI.java

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,24 @@ public GUIController getControllerFromName(String name) {
241241
*/
242242
public void errorHandling(GameError error) {
243243
switch (error.getError()) {
244-
case WORKERBLOCKED -> Platform.runLater(() -> {
245-
errorDialog("The worker you have selected is blocked, please choose another one!");
246-
selectWorker();
247-
});
248-
case INVALIDINPUT -> Platform.runLater(() -> {
249-
errorDialog("Invalid input, please try again!");
250-
});
251-
case CELLOCCUPIED -> Platform.runLater(() -> {
252-
errorDialog("Cell already occupied!");
253-
});
254-
default -> Platform.runLater(() -> {
255-
errorDialog("Generic Error!");
256-
});
244+
case WORKERBLOCKED ->
245+
Platform.runLater(() -> {
246+
errorDialog("The worker you have selected is blocked, please choose another one!");
247+
selectWorker();
248+
});
249+
case INVALIDINPUT ->
250+
Platform.runLater(() -> {
251+
errorDialog("Invalid input, please try again!");
252+
});
253+
case CELLOCCUPIED ->
254+
Platform.runLater(() -> {
255+
errorDialog("Cell already occupied!");
256+
});
257+
default -> {
258+
Platform.runLater(() -> {
259+
errorDialog("Generic Error!");
260+
});
261+
}
257262
}
258263
}
259264

0 commit comments

Comments
 (0)