From a7ea5773da6d591b6e7747bdf231694bcb3ebce1 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Mon, 18 Nov 2024 05:05:37 +0100 Subject: [PATCH] resolve merge conflict --- .../pp/monopoly/notification/SoundEvent.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) 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); } } - -