10-08-2020, 12:31 PM
Good to know. So "results" is the new feature?
So this code:
(count
in:(intersection
(sites Occupied by:Next component:"Ball")
(forEach
(sites LineOfSight at:(last To) Orthogonal)
if:(=
(min
(results
from:(last To)
to:(sites LineOfSight at:(from) All)
(count Steps All (from) (to))
)
)
(count Steps Orthogonal (from) (to))
)
)
)
)
would then give the number of balls, among those pieces closest to the given site, correct?
This is on a hex grid. Does Orthogonal refer to a square grid, or does it refer to sequential cell-to-cell grid lines?
Does Adjacent mean continuing in the initially adjacent directions, or mean continuing outward in branched adjacent steps (Manhattan distance for example), or mean adjacent branching in all directions, hence all locations within the distance as well?
So this code:
(count
in:(intersection
(sites Occupied by:Next component:"Ball")
(forEach
(sites LineOfSight at:(last To) Orthogonal)
if:(=
(min
(results
from:(last To)
to:(sites LineOfSight at:(from) All)
(count Steps All (from) (to))
)
)
(count Steps Orthogonal (from) (to))
)
)
)
)
would then give the number of balls, among those pieces closest to the given site, correct?
This is on a hex grid. Does Orthogonal refer to a square grid, or does it refer to sequential cell-to-cell grid lines?
Does Adjacent mean continuing in the initially adjacent directions, or mean continuing outward in branched adjacent steps (Manhattan distance for example), or mean adjacent branching in all directions, hence all locations within the distance as well?