Package com.deco2800.game.services
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 scoreint
getScore()
returns base score + bonus
-
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
-