12-07-2020, 07:40 AM
Hi,
No, what you have in your example here will return the maximum of an Integer array corresponding to the result of the product of 1 by the size of each stack by the mover.
So to sum up, that function returns the size of the highest stack of the mover.
And not the site where is that highest stack.
If you want to use that function, you will have after to check all the sites owned by the mover and to keep the sites where the stack size is equal to that value. With
(forEach (sites Occupied by:Mover) if:(= (size Stack at:(site)) (YOUR EXAMPLE)))
And for the other question, the answer is no.
Regards,
Eric
No, what you have in your example here will return the maximum of an Integer array corresponding to the result of the product of 1 by the size of each stack by the mover.
So to sum up, that function returns the size of the highest stack of the mover.
And not the site where is that highest stack.
If you want to use that function, you will have after to check all the sites owned by the mover and to keep the sites where the stack size is equal to that value. With
(forEach (sites Occupied by:Mover) if:(= (size Stack at:(site)) (YOUR EXAMPLE)))
And for the other question, the answer is no.
Regards,
Eric