Package it.polimi.ingsw.Common
Interface ObjectCardInterface
- All Superinterfaces:
Remote
- All Known Implementing Classes:
ClientObjectCard
,ObjectCard
,ObjectCardType
Object Cards Interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic char
getChar
(int ordinal) Returns a char corresponding to the ordinal of a given card type.static String
getColoredSequence
(int ordinal) Returns a colored escape sequence corresponding to the ordinal of a given card type.static int
getOrdinal
(char c) This method associates an int to a letter referred to an ObjectCardType
-
Method Details
-
getOrdinal
This method associates an int to a letter referred to an ObjectCardType- Parameters:
c
- char read from file- Returns:
- an int
- Throws:
Exception
- when char doesn't match any first letter of the ObjectCardTypes
-
getChar
Returns a char corresponding to the ordinal of a given card type.- Parameters:
ordinal
- position in ObjectCardType enumeration- Returns:
- the corresponding char
- Throws:
Exception
- if ordinal given does not correspond to an ObjectCardType
-
getColoredSequence
Returns a colored escape sequence corresponding to the ordinal of a given card type.- Parameters:
ordinal
- position in ObjectCardType enumeration- Returns:
- the corresponding colored escape sequence
- Throws:
Exception
- if ordinal given does not correspond to an ObjectCardType
-