Class PrivateObjective

java.lang.Object
it.polimi.ingsw.model.PrivateObjective
All Implemented Interfaces:
Serializable

public class PrivateObjective extends Object implements Serializable
class which represent the private objective for each player. Immutable
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    the columns of the library that will be checked by the objective
    final String
     
    int
    the unique identifier of the private objective
    int
    the rows of the library that will be checked by the objective
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrivateObjective(Card[][] mat, int id)
    normal constructor for this type of objects
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countPoints(Card[][] cards)
    count the points accumulated by the player
    void
    method that draws the objective itself (the matrix of cards)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • imagePath

      public final String imagePath
    • objectiveId

      public int objectiveId
      the unique identifier of the private objective
    • ROWS

      public int ROWS
      the rows of the library that will be checked by the objective
    • COLS

      public int COLS
      the columns of the library that will be checked by the objective
  • Constructor Details

    • PrivateObjective

      public PrivateObjective(Card[][] mat, int id)
      normal constructor for this type of objects
      Parameters:
      mat - the matrix which identify the objective
      id - the unique identifier of the objective
  • Method Details

    • countPoints

      public int countPoints(Card[][] cards)
      count the points accumulated by the player
      Parameters:
      cards - matrix of the player's library
      Returns:
      number of total actual points
    • draw

      public void draw()
      method that draws the objective itself (the matrix of cards)