merge development into test #26

Merged
j23f0712 merged 95 commits from development into dev/test 2024-12-01 21:02:48 +01:00
2 changed files with 20 additions and 20 deletions
Showing only changes of commit 6f71a8b16d - Show all commits

View File

@@ -12,7 +12,7 @@ public class MdgaApp extends SimpleApplication {
private AcousticHandler acousticHandler; private AcousticHandler acousticHandler;
private NotificationSynchronizer notificationSynchronizer; private NotificationSynchronizer notificationSynchronizer;
private InputSynchronizer inputSynchronizer; private InputSynchronizer inputSynchronizer;
private ModelSyncronizer modelSyncronizer; private ModelSynchronizer modelSynchronizer;
MdgaView view = null; MdgaView view = null;
private MdgaState state = null; private MdgaState state = null;
@@ -50,7 +50,7 @@ public void simpleInitApp() {
acousticHandler = new AcousticHandler(this); acousticHandler = new AcousticHandler(this);
notificationSynchronizer = new NotificationSynchronizer(this); notificationSynchronizer = new NotificationSynchronizer(this);
inputSynchronizer = new InputSynchronizer(this); inputSynchronizer = new InputSynchronizer(this);
modelSyncronizer = new ModelSyncronizer(this); modelSynchronizer = new ModelSynchronizer(this);
mainView = new MainView(this); mainView = new MainView(this);
lobbyView = new LobbyView(this); lobbyView = new LobbyView(this);
@@ -114,8 +114,8 @@ public MdgaView getView() {
return view; return view;
} }
public ModelSyncronizer getModelSyncronizer() { public ModelSynchronizer getModelSyncronizer() {
return modelSyncronizer; return modelSynchronizer;
} }
public InputSynchronizer getInputSyncronizer() { return inputSynchronizer; } public InputSynchronizer getInputSyncronizer() { return inputSynchronizer; }

View File

@@ -79,29 +79,29 @@ private void handleGame(Notification notification) {
// Handle AcquireCardNotification // Handle AcquireCardNotification
} else if (notification instanceof ActivePlayerNotification n) { } else if (notification instanceof ActivePlayerNotification n) {
gameView.getGuiHandler().setActivePlayer(n.getColor()); gameView.getGuiHandler().setActivePlayer(n.getColor());
} else if (notification instanceof CeremonyNotification) { } else if (notification instanceof CeremonyNotification ceremonyNotification) {
app.enter(MdgaState.CEREMONY); app.enter(MdgaState.CEREMONY);
CeremonyView ceremonyView = (CeremonyView) app.getView(); CeremonyView ceremonyView = (CeremonyView) app.getView();
int size = n.getNames().size(); int size = ceremonyNotification.getNames().size();
if (n.getPiecesThrown().size() != size || if (ceremonyNotification.getPiecesThrown().size() != size ||
n.getPiecesLost().size() != size || ceremonyNotification.getPiecesLost().size() != size ||
n.getBonusCardsPlayed().size() != size || ceremonyNotification.getBonusCardsPlayed().size() != size ||
n.getSixes().size() != size || ceremonyNotification.getSixes().size() != size ||
n.getNodesMoved().size() != size || ceremonyNotification.getNodesMoved().size() != size ||
n.getBonusNodes().size() != size) { ceremonyNotification.getBonusNodes().size() != size) {
throw new IllegalArgumentException("All data lists in CeremonyNotification must have the same size."); throw new IllegalArgumentException("All data lists in CeremonyNotification must have the same size.");
} }
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
Color color = n.getColors().get(i); Color color = ceremonyNotification.getColors().get(i);
String name = n.getNames().get(i); String name = ceremonyNotification.getNames().get(i);
int v1 = n.getPiecesThrown().get(i); int v1 = ceremonyNotification.getPiecesThrown().get(i);
int v2 = n.getPiecesLost().get(i); int v2 = ceremonyNotification.getPiecesLost().get(i);
int v3 = n.getBonusCardsPlayed().get(i); int v3 = ceremonyNotification.getBonusCardsPlayed().get(i);
int v4 = n.getSixes().get(i); int v4 = ceremonyNotification.getSixes().get(i);
int v5 = n.getNodesMoved().get(i); int v5 = ceremonyNotification.getNodesMoved().get(i);
int v6 = n.getBonusNodes().get(i); int v6 = ceremonyNotification.getBonusNodes().get(i);
ceremonyView.addCeremonyParticipant(color, i, name); ceremonyView.addCeremonyParticipant(color, i, name);
ceremonyView.addStatisticsRow(name, v1, v2, v3, v4, v5, v6); ceremonyView.addStatisticsRow(name, v1, v2, v3, v4, v5, v6);