Files
basic-computer-games/18_Bullseye/java/src/Player.java
Chris Reuter d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00

28 lines
416 B
Java

/**
* A Player in the game - consists of name and score
*
*/
public class Player {
private final String name;
private int score;
Player(String name) {
this.name = name;
this.score = 0;
}
public void addScore(int score) {
this.score += score;
}
public String getName() {
return name;
}
public int getScore() {
return score;
}
}