diff --git a/OGP1718-Worms/src/worms/model/Food.java b/OGP1718-Worms/src/worms/model/Food.java index 2129851..379a8a1 100644 --- a/OGP1718-Worms/src/worms/model/Food.java +++ b/OGP1718-Worms/src/worms/model/Food.java @@ -1,5 +1,39 @@ package worms.model; +import static java.lang.Math.*; + public class Food { + // region location + //=================================================================================== + + //=================================================================================== + // endregion + + // region shape + //=================================================================================== + + final double radius = 0.20; + + public double getMass() { + return this.mass; + } + + public void setMass() { + final double rho = 150; + double m = rho * (4/3 * PI * pow(radius, 3)); + this.mass = m; + } + + public double mass; + + //=================================================================================== + // endregion + + // region eat + //=================================================================================== + + + //=================================================================================== + // endregion }