Class CardImpl
java.lang.Object
ca.uqam.info.student.skyjo.model.CardImpl
- All Implemented Interfaces:
ca.uqam.info.max.skyjo.model.Card
Implementation of the Card's interface.
Represents a numeric Skyjo card identified by its integer value.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CardImpl
public CardImpl(int numberCard) Creates a Card with the given int.- Parameters:
numberCard- number of the card.
-
-
Method Details
-
getType
public ca.uqam.info.max.skyjo.model.CardType getType()Returns the type of this card.- Specified by:
getTypein interfaceca.uqam.info.max.skyjo.model.Card- Returns:
- the type correspondig to this card's value.
-
getValue
public int getValue()Returns the numeric value of this card.- Specified by:
getValuein interfaceca.uqam.info.max.skyjo.model.Card- Returns:
- the integer value of the card.
-
toString
Returns a formatted string representations of the card value. Single-digit values are padded with a leading space to ensure alignment in the game display.
-