Skip to content
Snippets Groups Projects
Commit 7faac365 authored by tildiko97's avatar tildiko97
Browse files

SimpleField: fluid + printStat

parent 842517d7
Branches
Tags
No related merge requests found
......@@ -113,18 +113,32 @@ public class SimpleField extends AbstractField {
public double getFriction() {
return friction;
}
@Override
public String toString() {
return "no fluid";
}
}
protected class Oil extends Fluid {
Oil() {
friction = 0;
}
@Override
public String toString() {
return "Oil";
}
}
protected class Honey extends Fluid {
Honey() {
friction = 2;
}
@Override
public String toString() {
return "Honey";
}
}
public void putOil() {
......@@ -139,7 +153,7 @@ public class SimpleField extends AbstractField {
{
super.printStat();
System.out.println("moveable: " + Main.getMoveableName(myMoveable));
System.out.println("fluid: " + fluid);
System.out.println("fluid: " + fluid.toString());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment