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][].isFarmer = false;
		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 x = 0;
		int y= 0;
        int r = 0;
        int q = 0;
        int w = 0;
        int k = 0;
        int m = 0;
        int e = 0;
        int newtPop = 0;
        int oldtPop = 0;
				 unusedacres = 0;
				unusedpops = 0;
				uneatenwheat = 0;
        PopMethods.scanPops(countrycode);

	//	System.out.println(popMethods.usedacres());
        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);

	}
}

@@ -228,25 +228,25 @@
  int uneaten
-w
+W
 heat = 0;%0A%0A%09
@@ -277,16 +277,25 @@
 ops() %7B%0A
+        %0A
 %09%09for (i
@@ -372,16 +372,17 @@
 th; i++)
+ 
 %7B%0A      
@@ -683,49 +683,8 @@
  5;%0A
-%09%09//Main.popArray%5B0%5D%5B%5D.isFarmer = false;%0A
 %09%09Ma
@@ -895,17 +895,17 @@
 ntry
-c
+C
 ode) %7B%0A%0A
 %09%09in
@@ -904,33 +904,8 @@
  %7B%0A%0A
-%09%09int x = 0;%0A%09%09int y= 0;%0A
     
@@ -946,25 +946,31 @@
         int 
-w
+newTPop
  = 0;%0A      
@@ -975,17 +975,23 @@
     int 
-k
+oldTPop
  = 0;%0A  
@@ -1000,32 +1000,19 @@
     
-int m = 0;%0A        int e
+unusedAcres
  = 0
@@ -1025,19 +1025,18 @@
     
-int newt
+unused
 Pop
+s
  = 0
@@ -1049,79 +1049,16 @@
     
-int oldtPop = 0;%0A%09%09%09%09 unusedacres = 0;%0A%09%09%09%09unusedpops = 0;%0A%09%09%09%09
 uneaten
-w
+W
 heat
@@ -1102,61 +1102,12 @@
 ntry
-code);%0A%0A%09//%09System.out.println(popMethods.usedacres()
+Code
 );%0A 
@@ -1182,33 +1182,33 @@
 signment(country
-c
+C
 ode);%0A%0A        w
@@ -1243,33 +1243,33 @@
 iortotal(country
-c
+C
 ode);%0A        fP
@@ -1302,33 +1302,33 @@
 mertotal(country
-c
+C
 ode);%0A%0A        q
@@ -1596,25 +1596,25 @@
 gner(country
-c
+C
 ode);%0A%0A     
@@ -1644,25 +1644,25 @@
 r(1, country
-c
+C
 ode);%0A      
@@ -1789,25 +1789,25 @@
 ycle(country
-c
+C
 ode);%0A      
@@ -1846,17 +1846,17 @@
 (country
-c
+C
 ode);%0A%0A%09

Update PopManager.java