Rework constructeur Player
Clement Colmerauer

Clement Colmerauer commited on 2024-12-13 09:56:13
Showing 9 changed files, with 1 additions and 7 deletions.

... ...
@@ -29,19 +29,13 @@ public class Player {
29 29
     private Natural currentHealthPoints;
30 30
     private Natural xp;
31 31
 
32
-    private HashMap<Ability, Integer> abilities; //Ability = stat
32
+    private final HashMap<Ability, Integer> abilities; //Ability = stat
33 33
     private ArrayList<String> inventory;
34 34
 
35 35
     public Player(String playerName, String avatar_name, Jobs avatarClass, int money, ArrayList<String> inventory) {
36 36
         this(playerName,avatar_name,avatarClass,money,inventory,Player.defaultMaxHp.toInt());
37 37
     }
38 38
 
39
-    private Player()
40
-    {
41
-        //Here to prevent the compilator to create default constructor
42
-        //TODO throw exception
43
-    }
44
-
45 39
     public Player(String playerName, String avatar_name, Jobs avatarClass, int money, ArrayList<String> inventory, int maxHp)
46 40
     {
47 41
         this.playerName = playerName;
48 42