From 459a54ac5dfd7b37e2570583233d06d9dfbc276a Mon Sep 17 00:00:00 2001 From: Yvonne Schmidt Date: Mon, 2 Dec 2024 08:36:54 +0100 Subject: [PATCH] added documentation for Rent --- .../pp/monopoly/client/gui/popups/Rent.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Rent.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Rent.java index 14530f9..21653d5 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Rent.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/popups/Rent.java @@ -16,14 +16,32 @@ import pp.monopoly.client.MonopolyApp; import pp.monopoly.notification.Sound; /** - * Rent popup is triggered when a player enters a field owned by another player and needs to pay rent. + * Rent is a popup that is triggered when a player lands on a property owned by another player + * and needs to pay rent in the Monopoly application. + *

+ * Displays the rent amount and the recipient player's name, with an option to confirm the payment. + *

*/ public class Rent extends Dialog { + /** Reference to the Monopoly application instance. */ private final MonopolyApp app; + + /** Semi-transparent overlay background for the popup. */ private final Geometry overlayBackground; + + /** Main container for the rent information and action. */ private final Container rentContainer; + + /** Background container providing a border for the rent popup. */ private final Container backgroundContainer; + /** + * Constructs the Rent popup displaying the rent amount and recipient player. + * + * @param app the Monopoly application instance + * @param playerName the name of the player to whom the rent is owed + * @param amount the amount of rent to be paid + */ public Rent(MonopolyApp app, String playerName, int amount) { super(app.getDialogManager()); this.app = app;