# Class PlaceCrewMemberCommand

java.lang.Object
it.polimi.ingsw.is25am31.network.socket.clientServerMessages.PlaceCrewMemberCommand

All Implemented Interfaces:
  `ClientServerCommand`, `Serializable`

public class PlaceCrewMemberCommand extends Object implements ClientServerCommand, Serializable
Represents a command sent from the client to the server to place a crew member or an alien of a specific color on a cabin in a specified position.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PlaceCrewMemberCommand(UUID clientId, int x, int y, AlienColor color)`
  Constructs a new `PlaceCrewMemberCommand`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute(SocketServer server)`
  Executes the command on the `SocketServer`, instructing it to place the specified crew member at the given coordinates for the client identified by `clientId`.

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

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

- ## Constructor Details

  - ### PlaceCrewMemberCommand

    public PlaceCrewMemberCommand(UUID clientId, int x, int y, AlienColor color)
    Constructs a new `PlaceCrewMemberCommand`.
    Parameters:
      `clientId` - The unique identifier of the client placing the crew member.
      `x` - The row where the crew member is to be placed.
      `y` - The column where the crew member is to be placed.
      `color` - The `AlienColor` of the crew member to be placed.

- ## Method Details

  - ### execute

    public void execute(SocketServer server) throws Exception
    Executes the command on the `SocketServer`, instructing it to place the specified crew member at the given coordinates for the client identified by `clientId`.
    Specified by:
      `execute` in interface `ClientServerCommand`
    Parameters:
      `server` - The `SocketServer` instance on which the command will be executed.
    Throws:
      `Exception` - if an error occurs during the placement of the crew member on the server.