Class CodexEntry

java.lang.Object
com.csse3200.game.services.CodexEntry

public class CodexEntry extends Object
Class representing a codex entry - storing all relevant data for an entry.
  • Constructor Details

    • CodexEntry

      public CodexEntry(String title, String text)
      Constructor that sets the text contents of the codex.
      Parameters:
      text - A string (with formatting) for the codex entry.
  • Method Details

    • setUnlocked

      public void setUnlocked()
      Set the unlocked flag to be true - use when player has unlocked entry;
    • getUnlockedIndex

      public int getUnlockedIndex()
    • isUnlocked

      public boolean isUnlocked()
      Get the state of the flag determining unlocked status.
      Returns:
      The flag determining unlocked status.
    • getText

      public String getText()
      Get the text contents of the entry.
      Returns:
      The text contents of the entry.
    • getTitle

      public String getTitle()
      Get the title of the entry.
      Returns:
      The title of the entry.