11-10-2020, 12:30 PM
Hi,
Sorry I did not see the full .lud was in your "code" section. Yes I am more usual with an attachment ;)
Concerning the bug, I fixed the issue in our code (dev version) to avoid the code to break. This is caused because you use in the (from ...) ludeme a RegionFunction rather than an IntFunction.
However, (enclose ...) is working only for a single site. Here an example of its use:
If you need to run the enclose capture to all the sites of a region you have to use a (forEach Site ....) ludeme to then call it inside of it. Here a different example concerning the use of (forEach Site ...)
Regards,
Eric
Sorry I did not see the full .lud was in your "code" section. Yes I am more usual with an attachment ;)
Concerning the bug, I fixed the issue in our code (dev version) to avoid the code to break. This is caused because you use in the (from ...) ludeme a RegionFunction rather than an IntFunction.
However, (enclose ...) is working only for a single site. Here an example of its use:
Code:
(move Add
(to (sites Empty))
(then
(enclose
(from (last To))
Orthogonal
(between
if:(is Enemy (who at:(between)))
(apply (remove (between)))
)
)
)
)
If you need to run the enclose capture to all the sites of a region you have to use a (forEach Site ....) ludeme to then call it inside of it. Here a different example concerning the use of (forEach Site ...)
Code:
(forEach Site
(sites Occupied by:Mover)
(set State at:(site) 1)
)
Regards,
Eric