mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-04 01:40:37 +02:00
can now dynamically update toolbar view
This commit is contained in:
@@ -46,5 +46,17 @@ public interface GameEventListener {
|
||||
*/
|
||||
default void receivedEvent(ClientStateEvent event) { /* do nothing */ }
|
||||
|
||||
/**
|
||||
* Indicates that the dice result has changed.
|
||||
*
|
||||
* @param event the received event
|
||||
*/
|
||||
default void receivedEvent(DiceRollEvent event) { /*Do nothing */}
|
||||
|
||||
/**
|
||||
* Indicates that the players assets have changed.
|
||||
*
|
||||
* @param event the received event
|
||||
*/
|
||||
default void receivedEvent(UpdatePlayerView event) { /*Do nothing */}
|
||||
}
|
||||
|
@@ -0,0 +1,13 @@
|
||||
package pp.monopoly.notification;
|
||||
|
||||
public record UpdatePlayerView() implements GameEvent{
|
||||
/**
|
||||
* Notifies the game event listener of this event.
|
||||
*
|
||||
* @param listener the game event listener
|
||||
*/
|
||||
@Override
|
||||
public void notifyListener(GameEventListener listener) {
|
||||
listener.receivedEvent(this);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user