# Class UpdatePositionsCommand

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

All Implemented Interfaces:
  `ServerClientCommand`, `Serializable`

public class UpdatePositionsCommand extends Object implements ServerClientCommand, Serializable
Represents a command sent from the server to the client to update players' positions.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpdatePositionsCommand(Map<Integer,Integer> positions)`
  Constructs a new `UpdatePositionsCommand` with the specified map of positions.

- ## Method Summary

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

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

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

- ## Constructor Details

  - ### UpdatePositionsCommand

    public UpdatePositionsCommand(Map<Integer,Integer> positions)
    Constructs a new `UpdatePositionsCommand` with the specified map of positions.
    Parameters:
      `positions` - A map where keys represent player identifiers and values represent their updated positions.

- ## Method Details

  - ### execute

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