reformat
parent
5b516418ed
commit
9a7aa7c6b3
|
@ -50,7 +50,9 @@ public abstract class Building {
|
||||||
this.health = health;
|
this.health = health;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStage(Stage stage) {this.stage = stage; }
|
public void setStage(Stage stage) {
|
||||||
|
this.stage = stage;
|
||||||
|
}
|
||||||
|
|
||||||
public void addInhabitant(Inhabitant newMember) {
|
public void addInhabitant(Inhabitant newMember) {
|
||||||
inhabitants.add(newMember);
|
inhabitants.add(newMember);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package ca.cosc3p91.a2.gameobjects;
|
package ca.cosc3p91.a2.gameobjects;
|
||||||
|
|
||||||
import ca.cosc3p91.a2.game.Map;
|
import ca.cosc3p91.a2.game.Map;
|
||||||
|
|
||||||
public interface Inhabitant {
|
public interface Inhabitant {
|
||||||
|
@ -8,10 +9,13 @@ public interface Inhabitant {
|
||||||
int lvl = 1;
|
int lvl = 1;
|
||||||
|
|
||||||
void move(Tile t);
|
void move(Tile t);
|
||||||
|
|
||||||
void getPosition();
|
void getPosition();
|
||||||
|
|
||||||
default int getLevel() {
|
default int getLevel() {
|
||||||
return lvl;
|
return lvl;
|
||||||
}
|
}
|
||||||
|
|
||||||
default int setLevel(int level) {
|
default int setLevel(int level) {
|
||||||
return lvl;
|
return lvl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ public class Worker implements Inhabitant {
|
||||||
public void set_IsBuilding(boolean state) {
|
public void set_IsBuilding(boolean state) {
|
||||||
currentlyBuilding = state;
|
currentlyBuilding = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCurrentlyBuilding() {
|
public boolean isCurrentlyBuilding() {
|
||||||
return currentlyBuilding;
|
return currentlyBuilding;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,4 @@ package ca.cosc3p91.a2.player;
|
||||||
public class Player {
|
public class Player {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue