Class ScoreSystem
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.ScoreSystem.ScoreSystem
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
getAccuracyScore
(List<String> playerIngredients, List<String> orderIngredients) Function that is called to retrieve the accuracy of the player's meal.static int
getCompletionScore
(List<Float> ingredients) Function that is called to retrieve the score based on the how 'chopped' or 'cooked' an ingredient is.static String
getFinalScore
(int accuracyScore, int timeScore, int completionScore) Function that is called to retrieve the final score based on all considered factors.static int
getTimeScore
(String orderTime) Function that is called to retrieve the score based on the time remaining before the ticket expires.Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ScoreSystem
public ScoreSystem()
-
-
Method Details
-
getAccuracyScore
Function that is called to retrieve the accuracy of the player's meal.- Parameters:
playerIngredients
- - the ingredients used in the player's meal.orderIngredients
- - the ingredients needed to make the ordered meal.
-
getTimeScore
Function that is called to retrieve the score based on the time remaining before the ticket expires.- Parameters:
orderTime
- - the time that is remaining before the order ticket disappears.
-
getCompletionScore
Function that is called to retrieve the score based on the how 'chopped' or 'cooked' an ingredient is.- Parameters:
ingredients
- - the ingredients that were used to create the player's meal.
-
getFinalScore
Function that is called to retrieve the final score based on all considered factors.- Parameters:
accuracyScore
- - the score that measures the accuracy of the player's meal.timeScore
- - the score that is dependent on how much time remains on the ticket.completionScore
- - the score that indicates how 'cooked' or 'chopped' the ingredients are.
-