# Class NotifyDefeatCommand

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

All Implemented Interfaces:
  `ServerClientCommand`, `Serializable`

public class NotifyDefeatCommand extends Object implements ServerClientCommand, Serializable
Represents a command sent from the server to the client to notify them of their defeat.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NotifyDefeatCommand(int loseType)`
  Constructs a new `NotifyDefeatCommand`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketClient client)`
  Executes the command on the `SocketClient`, instructing it to the defeat notification.

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

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

- ## Constructor Details

  - ### NotifyDefeatCommand

    public NotifyDefeatCommand(int loseType)
    Constructs a new `NotifyDefeatCommand`.
    Parameters:
      `loseType` - an integer representing the type of defeat.

- ## Method Details

  - ### execute

    public void execute(SocketClient client)
    Executes the command on the `SocketClient`, instructing it to the defeat notification.
    Specified by:
      `execute` in interface `ServerClientCommand`
    Parameters:
      `client` - the `SocketClient` instance to execute the command on.