summaryrefslogtreecommitdiffstats
path: root/src/Actor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Actor.java')
-rw-r--r--src/Actor.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Actor.java b/src/Actor.java
index ca3995a..ef63217 100644
--- a/src/Actor.java
+++ b/src/Actor.java
@@ -1,22 +1,31 @@
public class Actor {
+ // TODO: make final
private String name;
- private boolean alive;
+ // TODO: could be replaced with `bool isAlive() { return this.hp > 0; }`
+ private boolean alive;
+ // TODO: enemy should not be binary (ex clans / groups / factions)
private boolean enemy;
private int hp;
+ // TODO: pack abilities / bonus / powers in structures
private int agility;
private int strenght;
private int defense;
+
private int x;
private int y;
+
private Weapon weapon;
private int actionsLeft;
+ // TODO: make final
private int actions = 2;
+ // TODO: make bonus / power-ups structure
public Actor(String name, int hp, boolean enemy, int agility) {
this.name = name;
this.hp = hp;
this.enemy = enemy;
this.agility = agility;
+ // TODO: puch should have infinite durability
this.weapon = new Weapon("fist", 1, 1, 10000000);
this.alive = true;
@@ -49,6 +58,7 @@ public class Actor {
this.weapon = weapon;
}
+ // TODO: could be `return this.hp > 0` and remove member
public boolean isAlive() {
return this.alive;
}