Interface ObjectCardInterface

All Superinterfaces:
Remote
All Known Implementing Classes:
ClientObjectCard, ObjectCard, ObjectCardType

public interface ObjectCardInterface extends Remote
Object Cards Interface
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static 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

      static int getOrdinal(char c) throws Exception
      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

      static char getChar(int ordinal) throws Exception
      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

      static String getColoredSequence(int ordinal) throws Exception
      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