added documentation for GulagInfo

This commit is contained in:
Yvonne Schmidt 2024-12-02 08:44:23 +01:00
parent a4c0afe277
commit 69ad19757d

View File

@ -13,14 +13,27 @@ import pp.monopoly.message.client.NotificationAnswer;
import pp.monopoly.notification.Sound;
/**
* ConfirmTrade is a popup which appears when a trade is proposed to this certain player.
* GulagInfo is a popup that provides options for a player who is stuck in the "Gulag" (jail) field.
* <p>
* This dialog offers multiple actions, including paying a bribe, using a "Get Out of Jail" card, or waiting.
* </p>
*/
public class GulagInfo extends Dialog {
/** Reference to the Monopoly application instance. */
private final MonopolyApp app;
/** Main container for the Gulag information dialog. */
private final Container gulagInfoContainer;
/** Background container providing a styled border around the dialog. */
private final Container backgroundContainer;
/**
* Constructs a GulagInfo popup that provides the player with options for getting out of the "Gulag" field.
*
* @param app the Monopoly application instance
* @param trys the number of failed attempts to roll doubles for release
*/
public GulagInfo(MonopolyApp app, int trys) {
super(app.getDialogManager());
this.app = app;
@ -104,7 +117,7 @@ public class GulagInfo extends Dialog {
}
/**
* Schließt das Menü und entfernt die GUI-Elemente.
* Closes the GulagInfo popup and removes its GUI elements.
*/
@Override
public void close() {
@ -113,6 +126,9 @@ public class GulagInfo extends Dialog {
super.close();
}
/**
* Handles the escape action to close the GulagInfo dialog.
*/
@Override
public void escape() {
new SettingsMenu(app).open();