mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 01:09:46 +01:00
resolve merge conflict
This commit is contained in:
parent
5b66131d30
commit
a7ea5773da
@ -1,25 +1,26 @@
|
|||||||
|
////////////////////////////////////////
|
||||||
|
// Programming project code
|
||||||
|
// UniBw M, 2022, 2023, 2024
|
||||||
|
// www.unibw.de/inf2
|
||||||
|
// (c) Mark Minas (mark.minas@unibw.de)
|
||||||
|
////////////////////////////////////////
|
||||||
|
|
||||||
package pp.monopoly.notification;
|
package pp.monopoly.notification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event when a sound needs to be played.
|
* Event when an item is added to a map.
|
||||||
*
|
*
|
||||||
* @param soundFileName the sound file to be played
|
* @param sound the sound to be played
|
||||||
*/
|
*/
|
||||||
public class SoundEvent implements GameEvent {
|
public record SoundEvent(Sound sound) implements GameEvent {
|
||||||
private final String soundFileName;
|
|
||||||
|
|
||||||
public SoundEvent(Sound sound) {
|
|
||||||
this.soundFileName = sound.getFileName(); // Angenommen, Sound hat eine Methode getFileName()
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSoundFileName() {
|
|
||||||
return soundFileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies the game event listener of this event.
|
||||||
|
*
|
||||||
|
* @param listener the game event listener
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void notifyListener(GameEventListener listener) {
|
public void notifyListener(GameEventListener listener) {
|
||||||
listener.receivedEvent(this);
|
listener.receivedEvent(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user