package eco;

public class PopManager {

	public static int wPopulation = 0;
	public static int fPopulation = 0;
	public static int tPop = 0;
	public static int unusedacres = 0;
	public static int unusedpops = 0;
	public static int uneatenWheat = 0;

	public static void initpops() {
        
		for (int w = 0; w < 10; w++)
        for(int i =0; i < Main.popArray[w].length; i++) {
            Main.popArray[w][i] = new Pops();
        }

		Main.popArray[0][0].people = 5;
		Main.popArray[0][1].people = 5;
		Main.popArray[0][2].people = 5;
		Main.popArray[0][0].isFarmer = true;
		Main.popArray[0][1].isFarmer = false;
		Main.popArray[0][0].acres = 5;
		Main.popArray[0][1].acres = 5;
		Main.popArray[0][2].isWarrior = true;
		Main.popArray[0][0].isUsed = true;
		Main.popArray[0][1].isUsed = true;
		Main.popArray[0][2].isUsed = true;

	}

	public static void popController(int acres, int countryCode) {

        int r = 0;
        int q = 0;
        int newTPop = 0;
        int oldTPop = 0;
        unusedAcres = 0;
        unusedPops = 0;
        uneatenWheat = 0;
        PopMethods.scanPops(countryCode);
        unusedacres = acres;

        PopMethods.unusedAcresFarmersAssignment(countryCode);

        wPopulation = PopMethods.warriortotal(countryCode);
        fPopulation = PopMethods.farmertotal(countryCode);

        q = Warrior.wPop(wPopulation);
        r = Farmer.fPop(fPopulation);

        oldtPop = wPopulation + fPopulation;
        newtPop = q +r;
        PopManager.unusedpops = newtPop- oldtPop;
        //System.out.println(Main.unusedpops);
        PopMethods.popAssigner(countryCode);

        PopMethods.popBuilder(1, countryCode);
        wPopulation = q;
        fPopulation = r;
        tPop = wPopulation + fPopulation;

        PopMethods.farmerconsumecycle(countryCode);
        PopMethods.consumecyclewarrior(countryCode);

	}
}

@@ -156,25 +156,25 @@
 c int unused
-a
+A
 cres = 0;%0A%09p
@@ -192,25 +192,25 @@
 c int unused
-p
+P
 ops = 0;%0A%09pu
@@ -268,17 +268,17 @@
 oid init
-p
+P
 ops() %7B%0A
@@ -1119,17 +1119,17 @@
   unused
-a
+A
 cres = a
@@ -1490,17 +1490,17 @@
 r.unused
-p
+P
 ops = ne
@@ -1504,17 +1504,17 @@
  new
-t
+T
 Pop- old
 tPop
@@ -1513,61 +1513,14 @@
  old
-t
+T
 Pop;%0A
-        //System.out.println(Main.unusedpops);%0A
     

Update PopManager.java