public class PurePebble
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
mass |
int |
source |
int |
startingMass |
Constructor and Description |
---|
PurePebble(int source,
int mass,
int startMass) |
Modifier and Type | Method and Description |
---|---|
PurePebble |
combineWith(PurePebble p)
Return a combined pure pebble on two conditions.
|
PurePebble |
getDoubled()
Returns a pebble that has twice the mass of this pebble, or null if such a pebble would have a mass greater than
the startingMass.
|
public final int source
public final int mass
public int startingMass
public PurePebble getDoubled()
public PurePebble combineWith(PurePebble p)
p
-