# Class DiceResultCommand

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

All Implemented Interfaces:
  `ServerClientCommand`, `Serializable`

public class DiceResultCommand extends Object implements ServerClientCommand, Serializable
Represents a command sent from the server to the client to communicate the result of a dice roll.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DiceResultCommand(int diceResult)`
  Constructs a new `DiceResultCommand`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketClient client)`
  Executes the command on the `SocketClient`, instructing it to display and process the dice roll result.

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

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

- ## Constructor Details

  - ### DiceResultCommand

    public DiceResultCommand(int diceResult)
    Constructs a new `DiceResultCommand`.
    Parameters:
      `diceResult` - The integer value representing the outcome of the dice roll.

- ## Method Details

  - ### execute

    public void execute(SocketClient client) throws Exception
    Executes the command on the `SocketClient`, instructing it to display and process the dice roll result.
    Specified by:
      `execute` in interface `ServerClientCommand`
    Parameters:
      `client` - The `SocketClient` instance on which the command will be executed.
    Throws:
      `Exception` - if an error occurs while the client processes the dice result.