From 316b03cc5749e45dd1ad79091fd84d1d7310a845 Mon Sep 17 00:00:00 2001 From: juntinuous Date: Wed, 31 Jul 2024 13:37:34 -0500 Subject: [PATCH] updated score function --- src/main/java/uta/cse3310/Score.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/uta/cse3310/Score.java b/src/main/java/uta/cse3310/Score.java index 1e64781..b1b812c 100644 --- a/src/main/java/uta/cse3310/Score.java +++ b/src/main/java/uta/cse3310/Score.java @@ -2,15 +2,22 @@ public class Score { private int score; - private int playerId; + //private int playerId; + + public Score() + { + this.score =0; + } // gets the score of the player - public int getScore(int playerId) { - return 0; + public int getScore() { + + return score; } // updates score of player with the corresponding id - public void updateScore(int playerId, int score) { - + public void updateScore(int score) { + + this.score = this.score +score; } } \ No newline at end of file