03-05-2021, 07:14 AM
(This post was last modified: 03-05-2021, 07:29 AM by dale walton.)
(forEach Site Vertex/Cell (...))
I am having problems with
(or
(forEach Site (sites Empty Vertex) (move add (to (site)))
(move Select
(from Cell (sites Board Cell))
(to Cell (sites Around (from) OffDiagonal)
(then
(forEach Site
(sites Incident Vertex of:Cell at:(last From))
... anything based on (site)...
)))))
I can Add, I can Select, but the system makes an Add move instead of whatever is in the "anything" (the moves shows the result as the Add move performed, and the Select choices and Variables set or other actions in anything are not recorded event though I was able to make both selections.
I was wondering if the (forEach needs to know that it is handling Vertex in both cases,
However
(forEach Site Vertex/Cell (...)) is not implemented
This was on a tri-grid with use:Vertex.
My intent is to move some pieces on some Vertex based upon the selected Cells of the grid.
I found the problem more specifically: it has to do with OffDiagonal selections When Adjacent is specified, the program worked for the Orthogonal selections but not for the OffDiagonal selections.
Since the actual program is a bit more complicated, I will clean it up a bit to just show the bug, if you cannot find it from what info I have given.
I am having problems with
(or
(forEach Site (sites Empty Vertex) (move add (to (site)))
(move Select
(from Cell (sites Board Cell))
(to Cell (sites Around (from) OffDiagonal)
(then
(forEach Site
(sites Incident Vertex of:Cell at:(last From))
... anything based on (site)...
)))))
I can Add, I can Select, but the system makes an Add move instead of whatever is in the "anything" (the moves shows the result as the Add move performed, and the Select choices and Variables set or other actions in anything are not recorded event though I was able to make both selections.
I was wondering if the (forEach needs to know that it is handling Vertex in both cases,
However
(forEach Site Vertex/Cell (...)) is not implemented
This was on a tri-grid with use:Vertex.
My intent is to move some pieces on some Vertex based upon the selected Cells of the grid.
I found the problem more specifically: it has to do with OffDiagonal selections When Adjacent is specified, the program worked for the Orthogonal selections but not for the OffDiagonal selections.
Since the actual program is a bit more complicated, I will clean it up a bit to just show the bug, if you cannot find it from what info I have given.