mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-10-31 20:09:53 +00:00
fixed equality error causing shells to sometimes proliferate out of control
This commit is contained in:
parent
0ee2637024
commit
3ee19087e1
@ -24,8 +24,8 @@
|
|||||||
remaining-x (- dest-x pos-x)
|
remaining-x (- dest-x pos-x)
|
||||||
remaining-y (- dest-y pos-y)]
|
remaining-y (- dest-y pos-y)]
|
||||||
; only need to check one dimension
|
; only need to check one dimension
|
||||||
(if (and (< (Math/abs remaining-x) (Math/abs delta-x))
|
(if (and (<= (Math/abs remaining-x) (Math/abs delta-x))
|
||||||
(< (Math/abs remaining-y) (Math/abs delta-y)))
|
(<= (Math/abs remaining-y) (Math/abs delta-y)))
|
||||||
(merge shell {:pos-x dest-x
|
(merge shell {:pos-x dest-x
|
||||||
:pos-y dest-y
|
:pos-y dest-y
|
||||||
:exploded true})
|
:exploded true})
|
||||||
|
Loading…
Reference in New Issue
Block a user