Class TutorialTextController

java.lang.Object
com.mg105.interface_adapters.tutorial.TutorialTextController

public class TutorialTextController extends Object
A controller that converts phase number into displayed text
  • Constructor Details

    • TutorialTextController

      public TutorialTextController(boolean changeText)
      A constructor for the tutorial controller
      Parameters:
      changeText - whether to initially change the text.
  • Method Details

    • bottomText

      public String bottomText()
      Gets the current text that should be displayed
      Returns:
      what the text displayed at the bottom of the screen should be
    • nextPhase

      public void nextPhase()
      Go to the next tutorial phase
    • setChangeText

      public void setChangeText()
      Make text start changing
    • changeText

      public boolean changeText()
      Check if tutorial phases should advance
      Returns:
      if text should start changing
    • getShowControls

      public boolean getShowControls()
      Check if player should be shown controls again
      Returns:
      whether player should be shown the control texts
    • setShowControls

      public void setShowControls(boolean show)
      Tell player the controls again
      Parameters:
      show - the text on the screen when true
    • getTutorial

      public PlayerGetsTutorial getTutorial()
      Get an instance of the PlayerGetsTutorial use case
      Returns:
      the tutorial instance
    • isComplete

      public boolean isComplete()
      Get if the tutorial is complete, changes text if it is
      Returns:
      if the tutorial is complete
    • getActionPerformed

      public boolean getActionPerformed(String action)
      Returns if the action has been performed
      Parameters:
      action - that is checked
      Returns:
      if the specified action has been performed
    • allPhases

      public List<String> allPhases()
      Get names of all phases of tutorial
      Returns:
      the list of all tutorial phases