public class Treasure
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected java.awt.geom.Point2D |
location
The location.
|
protected int |
weight
The weight.
|
Constructor and Description |
---|
Treasure() |
Modifier and Type | Method and Description |
---|---|
protected static Treasure |
create(java.util.Random rnd,
double width,
double height)
Create a random treasure.
|
java.awt.geom.Point2D |
getLocation()
Get the location of the treasure.
|
protected java.awt.geom.Point2D location
protected int weight
protected static Treasure create(java.util.Random rnd, double width, double height)
rnd
- The random number generator.width
- The environment width.height
- The environment height.public java.awt.geom.Point2D getLocation()