-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayer.java
55 lines (45 loc) · 1.02 KB
/
Player.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.util.ArrayList;
public class Player {
private float maxWeight;
private ArrayList<Item> inventory;
private float currentWeight;
private float score;
private int moves;
Player(ArrayList<Item> newInventory, float newScore, int newMoves) {
setMaxWeight(20);
setInventory(newInventory);
setCurrentWeight(0);
setScore(newScore);
setMoves(newMoves);
}
public ArrayList<Item> getInventory() {
return inventory;
}
public void setInventory(ArrayList<Item> inventory) {
this.inventory = inventory;
}
public float getMaxWeight() {
return maxWeight;
}
public void setMaxWeight(float maxWeight) {
this.maxWeight = maxWeight;
}
public float getCurrentWeight() {
return currentWeight;
}
public void setCurrentWeight(float currentWeight) {
this.currentWeight = currentWeight;
}
public float getScore() {
return score;
}
public void setScore(float score) {
this.score = score;
}
public int getMoves() {
return moves;
}
public void setMoves(int moves) {
this.moves = moves;
}
}