commentaar canTurn

This commit is contained in:
Leen Dereu
2018-03-11 16:23:14 +01:00
parent 40e6a88c10
commit b15ccb5cca
2 changed files with 9 additions and 3 deletions

View File

@@ -592,9 +592,15 @@ public class Worm {
}
/**
*return a boolean reflecting whether the worm can accept the given angle to turn
*
* @param angle
* @return ...
* the angle to be checked
* @return true if and only if the given angle is between 0 (including) and 2pi,
* the angle is a number and the current number of action points is high enough to turn
* |result == ( (0 <= angle) && (angle < (2 * PI)) &&
| (!Double.isNaN(angle)) &&
| (getActionPoints() - (long) ceil(toDegrees(angle) / 6) >= 0) )
*/
private boolean canTurn(double angle) {
return 0 <= angle && angle < (2 * PI) &&

View File

@@ -3,7 +3,7 @@
- Worm DONE
- getMaxActionPoints DONE
- decreaseActionPoints DONE
- canTurn
- canTurn DONE
- Tuple (methode)
* testen schrijven
* documentatie Facade