Skip to content

Commit

Permalink
chore: Update Droid.java.
Browse files Browse the repository at this point in the history
  • Loading branch information
KhushalGupta authored Oct 9, 2022
1 parent d35b1f0 commit cdd5528
Showing 1 changed file with 3 additions and 65 deletions.
68 changes: 3 additions & 65 deletions Droid.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import net.obviam.bt.ai.Routine;

@Getter
@Setter
@RequiredArgsConstructor
public class Droid {

final String name;
Expand All @@ -10,15 +13,6 @@ public class Droid {
Routine routine;
Board board;

public Droid(String name, int x, int y, int health, int damage, int range) {
this.name = name;
this.x = x;
this.y = y;
this.health = health;
this.damage = damage;
this.range = range;
}

public void update() {
if (routine.getState() == null) {
// hasn't started yet so we start it
Expand All @@ -27,66 +21,10 @@ public void update() {
routine.act(this, board);
}

public int getX() {
return x;
}

public void setX(int x) {
this.x = x;
}

public int getY() {
return y;
}

public void setY(int y) {
this.y = y;
}

public int getRange() {
return range;
}

public void setRange(int range) {
this.range = range;
}

public int getDamage() {
return damage;
}

public void setDamage(int damage) {
this.damage = damage;
}

public int getHealth() {
return health;
}

public void setHealth(int health) {
this.health = health;
}

public boolean isAlive() {
return health > 0;
}

public Routine getRoutine() {
return routine;
}

public void setRoutine(Routine routine) {
this.routine = routine;
}

public String getName() {
return name;
}

public void setBoard(Board board) {
this.board = board;
}

@Override
public String toString() {
return "Droid{" +
Expand Down

0 comments on commit cdd5528

Please sign in to comment.