Skip to content
Snippets Groups Projects
Commit 0b19849d authored by tildiko97's avatar tildiko97
Browse files

printStat

parent a179395e
No related branches found
No related tags found
No related merge requests found
...@@ -30,4 +30,13 @@ public abstract class AbstractField { ...@@ -30,4 +30,13 @@ public abstract class AbstractField {
neighbours.put(d,n); neighbours.put(d,n);
} }
public void printStat()
{
System.out.println("neighborUp: " + Main.getFieldName(neighbours.get(Direction.UP)));
System.out.println("neighborRight: " + Main.getFieldName(neighbours.get(Direction.RIGHT)));
System.out.println("neighborDown: " + Main.getFieldName(neighbours.get(Direction.DOWN)));
System.out.println("neighborLeft: " + Main.getFieldName(neighbours.get(Direction.LEFT)));
}
} }
...@@ -134,4 +134,13 @@ public class SimpleField extends AbstractField { ...@@ -134,4 +134,13 @@ public class SimpleField extends AbstractField {
public void putHoney() { public void putHoney() {
fluid = new Honey(); fluid = new Honey();
} }
public void printStat()
{
super.printStat();
System.out.println("moveable: " + Main.getMoveableName(myMoveable));
System.out.println("fluid: " + fluid);
}
} }
...@@ -60,5 +60,13 @@ public class SwitchField extends SimpleField { ...@@ -60,5 +60,13 @@ public class SwitchField extends SimpleField {
public void setSHole(SwitchableHole sh) { public void setSHole(SwitchableHole sh) {
sHole = sh; sHole = sh;
} }
public void printStat()
{
super.printStat();
System.out.println("sHole: " + Main.getFieldName(sHole));
}
} }
...@@ -83,6 +83,13 @@ public class SwitchableHole extends SimpleField { ...@@ -83,6 +83,13 @@ public class SwitchableHole extends SimpleField {
} }
public void printStat()
{
super.printStat();
System.out.println("opened: " + opened);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment