Documentatie GameObject

This commit is contained in:
Leen Dereu
2018-05-23 22:27:13 +02:00
parent 9f8a250f71
commit f21a01e1d3

View File

@@ -14,14 +14,13 @@ public abstract class GameObject {
* @param world * @param world
* @param location * @param location
* @param radius * @param radius
*
* @post ... * @post ...
* |setWorld(world) * |setWorld(world)
* @post ... * @post ...
* |world.add(this) * |setLocation(location)
* @post ... * @post ...
* |setLocation(location) * |setRadius(radius)
* @post ...
* |setRadius(radius)
*/ */
protected GameObject(World world, double[] location, double radius) { protected GameObject(World world, double[] location, double radius) {
this(world, Coordinate.create(location), radius); this(world, Coordinate.create(location), radius);
@@ -32,14 +31,17 @@ public abstract class GameObject {
* @param world * @param world
* @param location * @param location
* @param radius * @param radius
*
* @post ... * @post ...
* |setWorld(world) * |setWorld(world)
* @post ... * @post ...
* |world.add(this) * |world.add(this)
* @post ... * @post ...
* |setLocation(location) * |setLocation(location)
* @post ... * @post ...
* |setRadius(radius) * |setRadius(radius)
*
* @throws todo?
*/ */
protected GameObject(World world, Coordinate location, double radius) { protected GameObject(World world, Coordinate location, double radius) {
if (!isValidLocation(location)) throw new IllegalArgumentException("Illegal location"); if (!isValidLocation(location)) throw new IllegalArgumentException("Illegal location");