From 5b2dc5ee0a5099107567e3ba180923c4c71043e3 Mon Sep 17 00:00:00 2001 From: Leen Dereu Date: Sun, 11 Mar 2018 21:09:50 +0100 Subject: [PATCH] aanpassen commentaar isValidLocation() --- OGP1718-Worms/src/worms/model/Worm.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OGP1718-Worms/src/worms/model/Worm.java b/OGP1718-Worms/src/worms/model/Worm.java index e6c2559..1056a0a 100644 --- a/OGP1718-Worms/src/worms/model/Worm.java +++ b/OGP1718-Worms/src/worms/model/Worm.java @@ -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(Tuplelocation) { return location != null && location.item1 != null && location.item2 != null