mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2026-01-12 05:06:05 -08:00
Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
This commit is contained in:
27
18_Bullseye/java/src/Player.java
Normal file
27
18_Bullseye/java/src/Player.java
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user