mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 00:06:16 +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;
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
/** 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;
|
||||
|
Loading…
Reference in New Issue
Block a user