made more classes deepClonable.

This commit is contained in:
2025-12-04 21:23:26 +01:00
parent 6607918635
commit 76f836b1c1
13 changed files with 66 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ public class ReversiController extends AbstractGameController<ReversiR> {
new ReversiCanvas(Color.GRAY, (App.getHeight() / 4) * 3, (App.getHeight() / 4) * 3,(c) -> {new EventFlow().addPostEvent(GUIEvents.PlayerAttemptedMove.class, c).postEvent();}, (c) -> {new EventFlow().addPostEvent(GUIEvents.PlayerMoveHovered.class, c).postEvent();}),
players,
ReversiR,
local ? new LocalFixedRateThreadBehaviour<>(ReversiR, players) : new OnlineThreadBehaviour<>(ReversiR), // TODO: Player order matters here, this won't work atm
local ? new LocalFixedRateThreadBehaviour<>(ReversiR) : new OnlineThreadBehaviour<>(ReversiR), // TODO: Player order matters here, this won't work atm
"Reversi");
eventFlow.listen(GUIEvents.PlayerAttemptedMove.class, event -> {if (getCurrentPlayer() instanceof LocalPlayer lp){lp.setMove(event.move());}}, false);
eventFlow.listen(GUIEvents.PlayerMoveHovered.class, this::onHoverMove, false);