Class ScoreService

java.lang.Object
com.deco2800.game.services.ScoreService

public class ScoreService
extends java.lang.Object
controls the game score
  • Constructor Summary

    Constructors 
    Constructor Description
    ScoreService()
    Constructor of score service gametime is the basic score calculation parameter.
  • Method Summary

    Modifier and Type Method Description
    void addToScore​(int bonus)
    Add bonus points to the score
    int getScore()
    returns base score + bonus

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScoreService

      public ScoreService()
      Constructor of score service gametime is the basic score calculation parameter. bonus is other features bonus scores.
  • Method Details

    • addToScore

      public void addToScore​(int bonus)
      Add bonus points to the score
      Parameters:
      bonus - bonus points
    • getScore

      public int getScore()
      returns base score + bonus
      Returns:
      score