diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/notification/SoundEvent.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/notification/SoundEvent.java index b42ed7d..2eaaefe 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/notification/SoundEvent.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/notification/SoundEvent.java @@ -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; /** - * 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 { - private final String soundFileName; - - public SoundEvent(Sound sound) { - this.soundFileName = sound.getFileName(); // Angenommen, Sound hat eine Methode getFileName() - } - - public String getSoundFileName() { - return soundFileName; - } +public record SoundEvent(Sound sound) 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); } } - -