add getter and setter for name

This commit is contained in:
Luca Conte 2024-11-30 18:39:58 +01:00
parent ab1aae7798
commit bdde2066f3
1 changed files with 7 additions and 0 deletions

View File

@ -28,4 +28,11 @@ public abstract class Player {
public void setEnemy(Player enemy) {
this.enemy = enemy;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
}