package eco; 

public class Market {
    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;
                Render.drawString("Price is one!", 10, 100);
            }
        }
        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;
    }
    */
        
    }

}

@@ -30,16 +30,21 @@
 arket %7B%0A
+    %0A
     publ
@@ -74,34 +74,44 @@
 e(int pastPrice)
+ 
 %7B%0A
+        %0A
         int newP
@@ -187,16 +187,17 @@
 ce %3E 50)
+ 
 %7B%0A      
@@ -266,16 +266,17 @@
     else
+ 
 %7B%0A      
@@ -493,28 +493,28 @@
 wPrice;%0A    
-    
+%7D%0A%7D%0A
 %0A    /*%0A    
@@ -1291,22 +1291,4 @@
  */%0A
-        %0A    %7D%0A%0A%7D%0A

Update Market.java