Class ScoreSystem

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.ScoreSystem.ScoreSystem

public class ScoreSystem extends Component
  • Constructor Details

    • ScoreSystem

      public ScoreSystem()
  • Method Details

    • getAccuracyScore

      public static int getAccuracyScore(List<String> playerIngredients, List<String> orderIngredients)
      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

      public static int getTimeScore(String orderTime)
      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

      public static int getCompletionScore(List<Float> ingredients)
      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

      public static String getFinalScore(int accuracyScore, int timeScore, int completionScore)
      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.