Package com.mg105.use_cases
Class PlayerGetsTutorial
java.lang.Object
com.mg105.use_cases.PlayerGetsTutorial
Class for determining what phase of the tutorial the player is on, and changing the phase
-
Constructor Summary
ConstructorDescriptionPlayerGetsTutorial
(List<String> tutorialPhases, int currentPhase) Constructor for PlayerGetsTutorial use case -
Method Summary
Modifier and TypeMethodDescriptionGet names of all phases of tutorialint
Get current phase of tutorial, which is first index of phase listboolean
getActionPerformed
(String action) Check if specific action has been performedboolean
Check if all required actions performed by playervoid
Advance current phase by 1void
setActionPerformed
(String action) Set the action to true if it has been performed
-
Constructor Details
-
PlayerGetsTutorial
Constructor for PlayerGetsTutorial use case- Parameters:
tutorialPhases
- a list of all possible phases in the tutorialcurrentPhase
- 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
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
Set the action to true if it has been performed- Parameters:
action
- to set to performed
-
getActionPerformed
Check if specific action has been performed- Parameters:
action
- get if it has been performed yet- Returns:
- if the action has been performed
-