1 package se
.umu
.cs
.dit06ajnajs
;
8 private int currentLevel
;
9 private int savedScore
;
12 this.name
= "Unnamed player";
15 this.currentLevel
= 2;
19 public void setName(String name
) {
23 public String
getName() {
27 public void addCredit(int credit
) {
28 this.credit
+= credit
;
32 public void removeCredit(int credit
) {
33 this.credit
-= credit
;
36 public void initCredit() {
40 public void setCurrentLevel(int num
) {
41 this.currentLevel
= num
;
44 public void saveScore() {
45 this.savedScore
= score
;
49 * Resets the current score to the last saved score
51 public void loadSavedScore() {
52 this.score
= this.savedScore
;
55 public int getSavedScore() {
56 return this.savedScore
;
59 public int getCredit() {
63 public int getScore() {
67 public int getCurrentLevel() {
68 return this.currentLevel
;