Merge branch 'master' of gitlab.principis.be:OGP/worms
This commit is contained in:
@@ -10,12 +10,16 @@ public class Facade implements IFacade {
|
||||
* Create and return a new worm that is positioned at the given location, looks
|
||||
* in the given direction, has the given radius and the given name.
|
||||
*
|
||||
* @param location An array containing the x-coordinate of the position of the new
|
||||
* @param location
|
||||
* An array containing the x-coordinate of the position of the new
|
||||
* worm followed by the y-coordinate of the position of the new worm
|
||||
* (in meter)
|
||||
* @param direction The direction of the new worm (in radians)
|
||||
* @param radius The radius of the new worm (in meter)
|
||||
* @param name ...
|
||||
* @param direction
|
||||
* The direction of the new worm (in radians)
|
||||
* @param radius
|
||||
* The radius of the new worm (in meter)
|
||||
* @param name
|
||||
* the name of the new worm
|
||||
*/
|
||||
@Override
|
||||
public Worm createWorm(double[] location, double direction, double radius, String name) throws ModelException {
|
||||
@@ -33,8 +37,10 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Moves the given worm by the given number of steps.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param nbSteps ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param nbSteps
|
||||
* the number of steps the worm is going to take
|
||||
*/
|
||||
@Override
|
||||
public void move(Worm worm, int nbSteps) throws ModelException {
|
||||
@@ -49,8 +55,10 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Turns the given worm by the given angle.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param angle ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param angle
|
||||
* the angle the worm should turn
|
||||
*/
|
||||
@Override
|
||||
public void turn(Worm worm, double angle) throws ModelException {
|
||||
@@ -61,7 +69,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Makes the given worm jump.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public void jump(Worm worm) throws ModelException {
|
||||
@@ -77,7 +86,8 @@ public class Facade implements IFacade {
|
||||
* Returns the total amount of time (in seconds) that a jump of the given worm
|
||||
* would take.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getJumpTime(Worm worm) throws ModelException {
|
||||
@@ -93,8 +103,10 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the location on the jump trajectory of the given worm after a time t.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param t ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param t
|
||||
* the time the worm should jump
|
||||
* @return An array with two elements, with the first element being the
|
||||
* x-coordinate and the second element the y-coordinate.
|
||||
*/
|
||||
@@ -113,7 +125,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the x-coordinate of the current location of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getX(Worm worm) throws ModelException {
|
||||
@@ -123,7 +136,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the y-coordinate of the current location of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getY(Worm worm) throws ModelException {
|
||||
@@ -133,7 +147,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the current orientation of the given worm (in radians).
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getOrientation(Worm worm) throws ModelException {
|
||||
@@ -143,7 +158,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the radius of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getRadius(Worm worm) throws ModelException {
|
||||
@@ -153,8 +169,10 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Sets the radius of the given worm to the given value.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param newRadius ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param newRadius
|
||||
* the new radius of the worm
|
||||
*/
|
||||
@Override
|
||||
public void setRadius(Worm worm, double newRadius) throws ModelException {
|
||||
@@ -169,7 +187,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the current number of action points of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public long getNbActionPoints(Worm worm) throws ModelException {
|
||||
@@ -180,8 +199,10 @@ public class Facade implements IFacade {
|
||||
* Decreases the current number of action points of the given worm with the
|
||||
* given delta.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param delta ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param delta
|
||||
* the value that schould be decreased
|
||||
*/
|
||||
@Override
|
||||
public void decreaseNbActionPoints(Worm worm, long delta) throws ModelException {
|
||||
@@ -191,7 +212,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the maximum number of action points of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public long getMaxNbActionPoints(Worm worm) throws ModelException {
|
||||
@@ -201,7 +223,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the name the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public String getName(Worm worm) throws ModelException {
|
||||
@@ -211,8 +234,10 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Renames the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param newName ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @param newName
|
||||
* the new name for the worm
|
||||
*/
|
||||
@Override
|
||||
public void rename(Worm worm, String newName) throws ModelException {
|
||||
@@ -227,7 +252,8 @@ public class Facade implements IFacade {
|
||||
/**
|
||||
* Returns the mass of the given worm.
|
||||
*
|
||||
* @param worm ...
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
*/
|
||||
@Override
|
||||
public double getMass(Worm worm) throws ModelException {
|
||||
|
Reference in New Issue
Block a user