resolve merge conflict

This commit is contained in:
Johannes Schmelz 2024-11-18 05:05:37 +01:00
parent 5b66131d30
commit a7ea5773da

View File

@ -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);
} }
} }