Release v3.5

Updated test suite
This commit is contained in:
Koen Yskout
2018-05-15 09:33:46 +02:00
parent cc27abd957
commit 2e15a29a4d
3 changed files with 33 additions and 36 deletions

View File

@@ -348,7 +348,7 @@ public interface IFacade {
* - Students working alone on the project must not override this method.
*/
default public boolean canFall(Worm worm) throws MustNotImplementException {
throw new MustNotImplementException();
return false;
}
/**
@@ -387,7 +387,7 @@ public interface IFacade {
/**
* Make the given worm eat a portion of food.
*/
void eat(Worm worm) throws ModelException;
void eat(Worm worm);
/**
* Have the give worm fire a projectile.
@@ -552,7 +552,7 @@ public interface IFacade {
* - Students working alone on the project must not override this method.
*/
default Team getTeam(Worm worm) throws ModelException {
throw new MustNotImplementException();
return null;
}
/**

View File

@@ -32,8 +32,8 @@ import worms.util.MustNotImplementException;
* <p>
* You should declare your class as follows:<code><pre>
* public class ProgramFactory implements IProgramFactory&lt;MyExpression, MyStatement, MyProc, Program&gt;
* </pre></code> where MyExpression, MyStatement, MyProc, and Program are your classes
* for representing expressions, statements, procedure definitions, and programs,
* </pre></code> where MyExpression, MyStatement and MyProc are your classes
* for representing expressions, statements and procedure definitions,
* respectively.
*
* <p>
@@ -90,7 +90,10 @@ public interface IProgramFactory<E, S, P, Program> {
* @param body
* The body of the procedure.
*/
public P createProcedureDefinition(String procedureName, S body, SourceLocation sourceLocation);
public default P createProcedureDefinition(String procedureName, S body, SourceLocation sourceLocation)
throws ModelException, MustNotImplementException {
throw new MustNotImplementException();
}
/* STATEMENTS */