Collapsed interfaces in Controller section

This commit is contained in:
2026-01-07 13:13:32 +01:00
parent 2caa4fc79f
commit b7dec7798b
4 changed files with 12 additions and 20 deletions

View File

@@ -1,9 +1,8 @@
package org.toop.framework.gameFramework.controller;
import org.toop.framework.gameFramework.model.game.threadBehaviour.Controllable;
import org.toop.framework.networking.connection.events.NetworkEvents;
public interface GameController extends Controllable, UpdatesGameUI {
public interface GameController {
/** Called when it is this player's turn to make a move. */
void onYourTurn(NetworkEvents.YourTurnResponse event);
@@ -13,5 +12,12 @@ public interface GameController extends Controllable, UpdatesGameUI {
/** Called when the game has finished, with the final result. */
void gameFinished(NetworkEvents.GameResultResponse event);
void start();
void stop();
/** Called to refresh or update the game UI. */
void updateUI();
void sendMove(long clientId, long move);
}

View File

@@ -1,10 +0,0 @@
package org.toop.framework.gameFramework.controller;
/**
* Interface for classes that can trigger a UI update.
*/
public interface UpdatesGameUI {
/** Called to refresh or update the game UI. */
void updateUI();
}

View File

@@ -1,7 +0,0 @@
package org.toop.framework.gameFramework.model.game.threadBehaviour;
public interface Controllable {
void start();
void stop();
}

View File

@@ -11,8 +11,11 @@ import java.util.function.Consumer;
* <p>
* Defines how a game's execution is started, stopped, and which player is active.
*/
public interface ThreadBehaviour extends Controllable {
public interface ThreadBehaviour {
void setOnUpdateUI(Runnable onUpdateUI);
void setOnSendMove(LongPairConsumer onSendMove);
void start();
void stop();
}