Class PlayerGetsTutorial

java.lang.Object
com.mg105.use_cases.PlayerGetsTutorial

public class PlayerGetsTutorial extends Object
Class for determining what phase of the tutorial the player is on, and changing the phase
  • Constructor Details

    • PlayerGetsTutorial

      public PlayerGetsTutorial(List<String> tutorialPhases, int currentPhase)
      Constructor for PlayerGetsTutorial use case
      Parameters:
      tutorialPhases - a list of all possible phases in the tutorial
      currentPhase - the integer representing what phase the player is on in the tutorial
  • Method Details

    • isComplete

      public boolean isComplete()
      Check if all required actions performed by player
      Returns:
      whether all actions are complete
    • allPhases

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

      public int currentPhase()
      Get current phase of tutorial, which is first index of phase list
      Returns:
      the current phase of tutorial
    • nextPhase

      public void nextPhase()
      Advance current phase by 1
    • setActionPerformed

      public void setActionPerformed(String action)
      Set the action to true if it has been performed
      Parameters:
      action - to set to performed
    • getActionPerformed

      public boolean getActionPerformed(String action)
      Check if specific action has been performed
      Parameters:
      action - get if it has been performed yet
      Returns:
      if the action has been performed