add getter
This commit is contained in:
parent
5f61cf50be
commit
026f58b3cc
@ -1,4 +1,4 @@
|
|||||||
class Stats {
|
export class Stats {
|
||||||
#score;
|
#score;
|
||||||
#highScore;
|
#highScore;
|
||||||
#highScoreStorageKey;
|
#highScoreStorageKey;
|
||||||
@ -20,4 +20,12 @@ class Stats {
|
|||||||
localStorage.setItem(this.#highScoreStorageKey, this.#highScore);
|
localStorage.setItem(this.#highScoreStorageKey, this.#highScore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get highScore() {
|
||||||
|
return this.#highScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
get score() {
|
||||||
|
return this.#score;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user