Skip to content

Commit

Permalink
updated score function
Browse files Browse the repository at this point in the history
  • Loading branch information
juntinuous committed Jul 31, 2024
1 parent e67e06f commit 316b03c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/main/java/uta/cse3310/Score.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 316b03c

Please sign in to comment.