aanpassen commentaar isValidLocation()

This commit is contained in:
Leen Dereu
2018-03-11 21:09:50 +01:00
parent fe410b0643
commit 5b2dc5ee0a

View File

@@ -142,7 +142,8 @@ public class Worm {
* the location to check
* @return True if and only if the location is not equal to null and the coordinates of
* the worm are numbers
* |result == (location != null) && (!Double.isNaN(location.item1)) && (!Double.isNaN(location.item2))
* |result == ( (location != null) && (location.item1 != null) && (location.item2 != null)
* |&& (!Double.isNaN(location.item1)) && (!Double.isNaN(location.item2)) )
*/
public static boolean isValidLocation(Tuple<Double, Double>location) {
return location != null && location.item1 != null && location.item2 != null