diff --git a/Assignment 2/src/ca/cosc3p91/a2/gameobjects/Village_Hall.java b/Assignment 2/src/ca/cosc3p91/a2/gameobjects/Village_Hall.java index 039216a..b73a489 100644 --- a/Assignment 2/src/ca/cosc3p91/a2/gameobjects/Village_Hall.java +++ b/Assignment 2/src/ca/cosc3p91/a2/gameobjects/Village_Hall.java @@ -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; + } } diff --git a/Assignment 2/src/ca/cosc3p91/a2/player/Player.java b/Assignment 2/src/ca/cosc3p91/a2/player/Player.java index 0dcbff3..a45991c 100644 --- a/Assignment 2/src/ca/cosc3p91/a2/player/Player.java +++ b/Assignment 2/src/ca/cosc3p91/a2/player/Player.java @@ -2,8 +2,6 @@ package ca.cosc3p91.a2.player; public class Player { - public int currentGold; - public int currentIron; - public int currentWood; + } \ No newline at end of file