commentaar canTurn
This commit is contained in:
@@ -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) &&
|
||||
|
@@ -3,7 +3,7 @@
|
||||
- Worm DONE
|
||||
- getMaxActionPoints DONE
|
||||
- decreaseActionPoints DONE
|
||||
- canTurn
|
||||
- canTurn DONE
|
||||
- Tuple (methode)
|
||||
* testen schrijven
|
||||
* documentatie Facade
|
||||
|
Reference in New Issue
Block a user