Quellcode durchsuchen

made feild static

mpierse vor 6 Jahren
Ursprung
Commit
d6aad27c94

+ 1
- 1
src/main/java/com/zipcodewilmington/froilansfarm/Animals/Chicken.java Datei anzeigen

@@ -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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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