fixes
This commit is contained in:
@@ -22,7 +22,7 @@ public class Facade implements IFacade {
|
||||
* the name of the new worm
|
||||
* @post the new worm has the given location, direction, name and radius
|
||||
* |new Worm(Tuple.create(location), direction, name, radius)
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalArgumentException
|
||||
* |catch(IllegalArgumentException e)
|
||||
*/
|
||||
@@ -35,8 +35,6 @@ public class Facade implements IFacade {
|
||||
catch(IllegalArgumentException e) {
|
||||
throw new ModelException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +46,7 @@ public class Facade implements IFacade {
|
||||
* the number of steps the worm is going to take
|
||||
* @post the worm has taken the given number of steps
|
||||
* |worm.move(nbSteps)
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalArgumentException
|
||||
* |catch(IllegalArgumentException e)
|
||||
*/
|
||||
@@ -84,7 +82,7 @@ public class Facade implements IFacade {
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @post the worm has jumped
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalStateException
|
||||
* |catch(IllegalStateException e)
|
||||
*/
|
||||
@@ -104,7 +102,7 @@ public class Facade implements IFacade {
|
||||
*
|
||||
* @param worm
|
||||
* the worm who is going to move
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalStateException
|
||||
* |catch(IllegalStateException e)
|
||||
*/
|
||||
@@ -128,7 +126,7 @@ public class Facade implements IFacade {
|
||||
* 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.
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalArgumentException
|
||||
* |catch (IllegalArgumentException e)
|
||||
*/
|
||||
@@ -197,7 +195,7 @@ public class Facade implements IFacade {
|
||||
* the new radius of the worm
|
||||
* @post the new radius is equal to the given newRadius
|
||||
* |worm.setRadius(newRadius)
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalArgumentException
|
||||
* |catch(IllegalArgumentException e)
|
||||
*/
|
||||
@@ -269,7 +267,7 @@ public class Facade implements IFacade {
|
||||
* the new name for the worm
|
||||
* @post the new name of the worm is equal to the given newName
|
||||
* |worm.setName(newName)
|
||||
* @throws ModelException(e)
|
||||
* @throws ModelException
|
||||
* the worm throws an IllegalNameException
|
||||
* |catch(IllegalNameException e)
|
||||
*/
|
||||
|
@@ -72,7 +72,7 @@ public class Tuple<T1, T2> {
|
||||
* | arr == null || arr.length != 2
|
||||
*/
|
||||
@Immutable
|
||||
public static <T1> Tuple<T1, T1> create(T1[] arr) throws IllegalArgumentException {
|
||||
public static Tuple<Double, Double> create(double[] arr) throws IllegalArgumentException {
|
||||
if (arr == null || arr.length != 2)
|
||||
throw new IllegalArgumentException("Invalid parameter arr");
|
||||
return new Tuple<>(arr[0], arr[1]);
|
||||
|
Reference in New Issue
Block a user