Package it.polimi.ingsw.model
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 booleanequals(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 levelDevelopCardColorgetColor()intgetLevel()java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
CardFlag
Constructor for cardFlag class. Constructs a cardFlag object with the specified level and color- Parameters:
level- the flag levelcolor- the flag color
-
-
Method Details
-
getLevel
public int getLevel() -
getColor
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.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:
equalsin classjava.lang.Object- Parameters:
obj- the object of which equality to 'this' is to be verified- Returns:
- true if the 2 objects are equal
-