Bladeren bron

made feild static

mpierse 6 jaren geleden
bovenliggende
commit
d6aad27c94

+ 1
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Animals/Chicken.java Bestand weergeven

@@ -8,7 +8,7 @@ import com.zipcodewilmington.froilansfarm.Produce;
8 8
 public class Chicken extends Amimal implements Produce {
9 9
 
10 10
     ChickenCoop coop = new ChickenCoop();
11
-    Egg egg = new Egg;
11
+    Egg egg = new Egg();
12 12
 
13 13
     public String makeNoise(){
14 14
         return "CLUCK CLUCK!!";

+ 2
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Animals/Freelan.java Bestand weergeven

@@ -9,9 +9,10 @@ import com.zipcodewilmington.froilansfarm.PlantsAndCrops.TomatoPlant;
9 9
 
10 10
 public class Freelan extends Person implements Farmer, Botanist {
11 11
 
12
-    Field field = new Field;
12
+
13 13
 
14 14
     public void plant(Crop type, int numToPlant){
15
+        Field field = new Field();
15 16
         CropRow row = new CropRow(type, numToPlant);
16 17
         field.addToField(row);
17 18
 

+ 1
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Holders/Field.java Bestand weergeven

@@ -6,7 +6,7 @@ import java.util.Map;
6 6
 
7 7
 public class Field {
8 8
 
9
-    private Map<Integer, CropRow> fieldMap;
9
+    static private Map<Integer, CropRow> fieldMap;
10 10
     private int rowNumber=1;
11 11
 
12 12