10-06-2020, 08:07 AM
Hi Dale,
>> Thus, I would appreciate a ludeme for finding the distance to the nearest piece from a site in any grid direction, (w/ options for limiting it to other directions.)
That is not possible in the current release version, but we already implemented it in our dev version. Consequently, you will be able to do that with the next release. Here an example of what you want:
Here, we get the minimum distance from the last 'to' site. to any piece in the line of sight from that site in All the directions.
>> An option for (count ...) for counting components of a particular type at a particular distance and a particular set of directions would also be much appreciated.
That is already possible with the current version. Here an example of a such thing:
Here we count the number of sites occupied by the next player with only components called "Ball" in the line of sight of the last 'to' site played in looking only the Orthogonal directions and we keep only the distance equals to 2.
Regards,
Eric Piette
>> Thus, I would appreciate a ludeme for finding the distance to the nearest piece from a site in any grid direction, (w/ options for limiting it to other directions.)
That is not possible in the current release version, but we already implemented it in our dev version. Consequently, you will be able to do that with the next release. Here an example of what you want:
Code:
(min
(results
from:(last To)
to:(sites LineOfSight at:(from) All)
(count Steps All (from) (to))
)
)
Here, we get the minimum distance from the last 'to' site. to any piece in the line of sight from that site in All the directions.
>> An option for (count ...) for counting components of a particular type at a particular distance and a particular set of directions would also be much appreciated.
That is already possible with the current version. Here an example of a such thing:
Code:
(count
in:(intersection
(forEach
(sites LineOfSight at:(last To) Orthogonal)
if:(= 2 (count Steps Orthogonal (from) (to)))
)
(sites Occupied by:Next component:"Ball")
)
)
Here we count the number of sites occupied by the next player with only components called "Ball" in the line of sight of the last 'to' site played in looking only the Orthogonal directions and we keep only the distance equals to 2.
Regards,
Eric Piette