Package javatro.display.screens
Class DiscardCardScreen
java.lang.Object
javatro.display.screens.Screen
javatro.display.screens.CardSelectScreen
javatro.display.screens.DiscardCardScreen
The
DiscardCardScreen class represents a screen where the user selects cards to discard.
It extends CardSelectScreen and includes commands for making a selection. The user can
select up to a predefined limit of cards (default is 5).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javatro.display.screens.CardSelectScreen
CardSelectScreen.SortOrder -
Field Summary
Fields inherited from class javatro.display.screens.Screen
commandMap -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aDiscardCardScreenand initializes the selection command. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisplays the current cards in the user's holding hand for selection.Methods inherited from class javatro.display.screens.CardSelectScreen
displayHoldingHand, getCardIndicesTitle, updateHoldingHandMethods inherited from class javatro.display.screens.Screen
clearCommandMap, displayOptions, getCommand, getCommandMap, getOptionsSize, getOutput
-
Constructor Details
-
DiscardCardScreen
Constructs aDiscardCardScreenand initializes the selection command. The selection limit is set to 5, meaning a maximum of 5 cards can be selected to discard.- Throws:
JavatroException- if an error occurs during initialization.
-
-
Method Details
-
displayScreen
public void displayScreen()Displays the current cards in the user's holding hand for selection. This method overrides the parent class implementation to provide specific behavior for discarding cards.- Specified by:
displayScreenin classCardSelectScreen
-