mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
added documentation for Rent
This commit is contained in:
parent
a50821f2e6
commit
459a54ac5d
@ -16,14 +16,32 @@ import pp.monopoly.client.MonopolyApp;
|
|||||||
import pp.monopoly.notification.Sound;
|
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.
|
||||||
|
* <p>
|
||||||
|
* Displays the rent amount and the recipient player's name, with an option to confirm the payment.
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
public class Rent extends Dialog {
|
public class Rent extends Dialog {
|
||||||
|
/** Reference to the Monopoly application instance. */
|
||||||
private final MonopolyApp app;
|
private final MonopolyApp app;
|
||||||
|
|
||||||
|
/** Semi-transparent overlay background for the popup. */
|
||||||
private final Geometry overlayBackground;
|
private final Geometry overlayBackground;
|
||||||
|
|
||||||
|
/** Main container for the rent information and action. */
|
||||||
private final Container rentContainer;
|
private final Container rentContainer;
|
||||||
|
|
||||||
|
/** Background container providing a border for the rent popup. */
|
||||||
private final Container backgroundContainer;
|
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) {
|
public Rent(MonopolyApp app, String playerName, int amount) {
|
||||||
super(app.getDialogManager());
|
super(app.getDialogManager());
|
||||||
this.app = app;
|
this.app = app;
|
||||||
|
Loading…
Reference in New Issue
Block a user