package eco; 

public class Market {
	static int[] prices = new int[75];
    public static int wheatPrice(int pastPrice){
        int newPrice = 1;
        int chance = (Main.randInt(0,100));
        if(chance > 50){
            newPrice = pastPrice + Main.randInt(1,5);
        }
        else{
            newPrice = pastPrice - Main.randInt(1,5);
            if(newPrice < 1){
                newPrice = 1;
                //World.messages.add(new Message("Price is one!", 100, 100, 300));
            }
        }
        //int num = 100000000;
        int y = 620;
        int x = 854;
        int shift = 100;
        prices[74] = newPrice;
        for(int i=0; i<prices.length; i++){
            	World.messages.add(new Message(".", (x - shift) + i, (y - shift) - prices[i], 1));
         }

    	for(int i=0; i<prices.length - 1; i++){
            prices[i] = prices[i + 1];
        }

		return newPrice;
        
    /*
    // Old Market
	public static double wheatPrice(int oldtWheat, int tWheat, int oldaggDemand, int aggDemand,double pastPrice){
        double newPrice = 1;
        
        if(oldtWheat != tWheat || oldaggDemand != aggDemand){
            double changeFactor;
            changeFactor = (tWheat)/(aggDemand);
            
            if(changeFactor ==  1){
                newPrice = pastPrice;
            }
            
            else if(changeFactor > 1){
                newPrice = (pastPrice*(1/changeFactor));
            }
            
            else if(changeFactor < 1){
                newPrice = (pastPrice + (changeFactor));
            }
            
            return newPrice;
        }
        newPrice = pastPrice;
        return newPrice;
    }
    */
        
    }
    

}

@@ -66,16 +66,83 @@
 nt%5B75%5D;%0A
+%09static int%5B%5D pop = new int%5B75%5D;%0A%09static int%5B%5D year = new int%5B75%5D;%0A
     publ
@@ -686,30 +686,270 @@
     
-prices%5B74%5D = newPrice;
+//Render.awtFont = Render.awtFont.deriveFont(24f); // set font size%0A%09%09//Render.font = new Render.TrueTypeFont(Render.awtFont, false);%0A        %0A        prices%5B74%5D = newPrice;%0A        //if(Main.year %25 35 == 0)%7B%0A        //%09year%5B74%5D = Main.year;%0A        //%7D%0A        
 %0A   
@@ -1034,16 +1034,23 @@
 essage(%22
+%5Cu25A0 
 .%22, (x -
@@ -1076,16 +1076,17 @@
 hift) - 
+(
 prices%5Bi
@@ -1086,16 +1086,145 @@
 rices%5Bi%5D
+), 1));%0A            %09//if(year%5Bi%5D != 0)%0A            %09//%09World.messages.add(new Message(%22%22 + year%5Bi%5D, (x - shift) + i, (y - shift)
 , 1));%0A 
@@ -1232,16 +1232,26 @@
        %7D
+%0A         
 %0A%0A    %09f
@@ -1338,16 +1338,531 @@
       %7D%0A
+        %0A        //for(int i=0; i%3Cyear.length - 1; i++)%7B%0A          //  year%5Bi%5D = year%5Bi + 1%5D;%0A        //%7D%0A        %0A        %0A        //World.messages.add(new Message(%22%22 + year, (x - shift), (y - shift - 40), 1));%0A        %0A%0A        pop%5B74%5D = Warrior.wPop + Farmer.fPop;%0A        for(int i=0; i%3Cpop.length; i++)%7B%0A            %09World.messages.add(new Message(%22%5Cu25A0 .%22, (x - 80 - shift) + i, (y - shift) - (pop%5Bi%5D), 1));%0A         %7D%0A%0A%0A    %09for(int i=0; i%3Cpop.length - 1; i++)%7B%0A            pop%5Bi%5D = pop%5Bi + 1%5D;%0A        %7D%0A%0A
 %0A%09%09retur

Update Market.java