# Class ShowSubDeckCommand

java.lang.Object
it.polimi.ingsw.is25am31.network.socket.serverClientMessages.ShowSubDeckCommand

All Implemented Interfaces:
  `ServerClientCommand`, `Serializable`

public class ShowSubDeckCommand extends Object implements ServerClientCommand, Serializable
Represents a command sent from the server to the client to display a sub-deck of cards.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ShowSubDeckCommand(List<Card> subDeck)`
  Constructs a new `ShowSubDeckCommand` with the specified list of cards representing a sub-deck.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketClient client)`
  Executes the command on the `SocketClient`, instructing it to show the provided sub-deck.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ShowSubDeckCommand

    public ShowSubDeckCommand(List<Card> subDeck)
    Constructs a new `ShowSubDeckCommand` with the specified list of cards representing a sub-deck.
    Parameters:
      `subDeck` - The list of cards to be displayed as a sub-deck.

- ## Method Details

  - ### execute

    public void execute(SocketClient client) throws Exception
    Executes the command on the `SocketClient`, instructing it to show the provided sub-deck.
    Specified by:
      `execute` in interface `ServerClientCommand`
    Parameters:
      `client` - The `SocketClient` instance to execute the command on.
    Throws:
      `Exception` - if an error occurs during sub-deck display.