From 026f58b3ccaf88945b2c82d563976bfa5558bd44 Mon Sep 17 00:00:00 2001 From: Florian Schmid Date: Wed, 19 Apr 2023 20:03:14 +0200 Subject: [PATCH] add getter --- js/statistics.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/statistics.js b/js/statistics.js index d7aa863..f44c017 100644 --- a/js/statistics.js +++ b/js/statistics.js @@ -1,4 +1,4 @@ -class Stats { +export class Stats { #score; #highScore; #highScoreStorageKey; @@ -20,4 +20,12 @@ class Stats { localStorage.setItem(this.#highScoreStorageKey, this.#highScore); } } + + get highScore() { + return this.#highScore; + } + + get score() { + return this.#score; + } } \ No newline at end of file