Class CharacterCardsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class CharacterCardsPanel extends JPanel
Class used to draw the 3 characterCards and their eventual contents; it also handles all 12 characterCards actions. This class will be initialized only in advanced Game
See Also:
  • Constructor Details

  • Method Details

    • printCharacterCardInfo

      private String printCharacterCardInfo(CharacterCard characterCard)
      Support method for printing characterCard's info
      Parameters:
      characterCard - CharacterCard desired by the player
      Returns:
      String containing all card's information
    • checkStatefulCard

      private void checkStatefulCard(CharacterCard characterCard, JLabel container)
      Support method, responsible for checking whether the characterCard contains some elements (statefulEffect)
      Parameters:
      characterCard - CharacterCard to check
      container - Container that will contain eventual characterCard's state
    • getStudentButton

      private ArrayList<StudentButton> getStudentButton(List<PawnColour> pawns)
      Support method used for getting a list of StudentButtons starting from a list of PawnColours
      Parameters:
      pawns - List of pawnColours that will be used for creating the studentButtons
      Returns:
      list of StudentButton