From 3ee19087e104a7c96b82aa808c98a944fa54542a Mon Sep 17 00:00:00 2001 From: Richard Harrington Date: Wed, 21 Aug 2013 21:59:30 -0400 Subject: [PATCH] fixed equality error causing shells to sometimes proliferate out of control --- src/robotwar/shell.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robotwar/shell.clj b/src/robotwar/shell.clj index 61fea61..9340440 100644 --- a/src/robotwar/shell.clj +++ b/src/robotwar/shell.clj @@ -24,8 +24,8 @@ remaining-x (- dest-x pos-x) remaining-y (- dest-y pos-y)] ; only need to check one dimension - (if (and (< (Math/abs remaining-x) (Math/abs delta-x)) - (< (Math/abs remaining-y) (Math/abs delta-y))) + (if (and (<= (Math/abs remaining-x) (Math/abs delta-x)) + (<= (Math/abs remaining-y) (Math/abs delta-y))) (merge shell {:pos-x dest-x :pos-y dest-y :exploded true})