mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 02:44:50 +00:00
Collapsed interfaces in Controller section
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package org.toop.framework.gameFramework.model.game.threadBehaviour;
|
||||
|
||||
public interface Controllable {
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user