move current storage to village hall

main
Brett 2023-03-02 12:42:24 -05:00
parent 55edf6fe54
commit 02504e59a6
2 changed files with 28 additions and 5 deletions

View File

@ -5,11 +5,13 @@ import java.util.ArrayList;
public class Village_Hall extends Building {
private int goldCapacity = 0;
private int ironCapacity = 0;
private int woodCapacity = 0;
private int currentGold;
private int currentIron;
private int currentWood;
public Village_Hall (int lvl, VillageStage baseStage) {
setLevel(lvl);
upgrade(baseStage);
@ -35,4 +37,27 @@ public class Village_Hall extends Building {
return woodCapacity;
}
public int getCurrentGold() {
return currentGold;
}
public void addCurrentGold(int currentGold) {
this.currentGold += currentGold;
}
public int getCurrentIron() {
return currentIron;
}
public void addCurrentIron(int currentIron) {
this.currentIron += currentIron;
}
public int getCurrentWood() {
return currentWood;
}
public void addCurrentWood(int currentWood) {
this.currentWood += currentWood;
}
}

View File

@ -2,8 +2,6 @@ package ca.cosc3p91.a2.player;
public class Player {
public int currentGold;
public int currentIron;
public int currentWood;
}