09-27-2020, 01:10 PM
In an attempt to implement triangular scoring differently I have come across a simpler case of what I think is the same behavior:
Suppose (var) is 1 before this function is called. I would expect it to go through each site in the group of (last To) to containing a 2-stack and set the state of the first to 1, the second to 2, the third to 3, and so on. But this does not seem to be the logic of (forEach Site). What am I misunderstanding?
Code:
(forEach Site
(forEach
(sites Group at:(last To))
if:(= 2 (size Stack at:(site)))
)
(do
(set State at:(site) (var))
next:(set Var (+ 1 (var)))
)
)
Suppose (var) is 1 before this function is called. I would expect it to go through each site in the group of (last To) to containing a 2-stack and set the state of the first to 1, the second to 2, the third to 3, and so on. But this does not seem to be the logic of (forEach Site). What am I misunderstanding?