Class MsgResponsePlayedCard

All Implemented Interfaces:
Serializable

public class MsgResponsePlayedCard extends MsgResponse implements Serializable
Response message which is sent when a player has successfully played a card
See Also:
  • Field Details

    • player

      private final PlayerLobby player
      The player that has played a card
    • cardPlayer

      private final CardPlayableIF cardPlayer
      The card that has been played
    • coordinates

      private final Coordinates coordinates
      The coordinates at which the card that has been played
    • points

      private final Integer points
      The points that the player has earned by playing the card
    • availableCoordinates

      private final List<Coordinates> availableCoordinates
      The list of coordinates that are available after playing the card
  • Constructor Details

    • MsgResponsePlayedCard

      public MsgResponsePlayedCard(PlayerLobby player, CardPlayableIF cardPlayer, Coordinates coordinates, Integer points, List<Coordinates> availableCoordinates)
      Builds a new response message with the given player, the played card, the coordinates of the card, the points that the player has earned and the available coordinates
      Parameters:
      player - the player that has played a card
      cardPlayer - the card that has been played
      coordinates - the coordinates at which the card that has been played
      points - the points that the player has earned by playing the card
      availableCoordinates - the list of coordinates that are available after playing the card
  • Method Details

    • getPlayer

      public PlayerLobby getPlayer()
      Returns:
      the player that has played a card
    • getCardPlayer

      public CardPlayableIF getCardPlayer()
      Returns:
      the card that has been played
    • getCoordinates

      public Coordinates getCoordinates()
      Returns:
      the coordinates of the card that has been played
    • getPoints

      public Integer getPoints()
      Returns:
      the points that the player has earned by playing the card
    • getAvailableCoordinates

      public List<Coordinates> getAvailableCoordinates()
      Returns:
      the list of coordinates that are available after playing the card