Class CardFlag

java.lang.Object
it.polimi.ingsw.model.CardFlag

public class CardFlag
extends java.lang.Object
Represents a develop card banner (i.e. level and colour of a develop card)
  • Constructor Summary

    Constructors
    Constructor Description
    CardFlag​(int level, DevelopCardColor color)
    Constructor for cardFlag class.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)
    Returns true if the specified obj is equal to this Two cardFlags are considered equals if they have matching color and level
    DevelopCardColor getColor()  
    int getLevel()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CardFlag

      public CardFlag​(int level, DevelopCardColor color)
      Constructor for cardFlag class. Constructs a cardFlag object with the specified level and color
      Parameters:
      level - the flag level
      color - the flag color
  • Method Details

    • getLevel

      public int getLevel()
    • getColor

      public DevelopCardColor getColor()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Returns true if the specified obj is equal to this Two cardFlags are considered equals if they have matching color and level
      Overrides:
      equals in class java.lang.Object
      Parameters:
      obj - the object of which equality to 'this' is to be verified
      Returns:
      true if the 2 objects are equal