That's a mistake in "NoFriendlyAdjacent". "(to)" should be "(site)". Like this:
It seems the error is caused by "CanCapture". It compiles if I change the to-parameter in (move Add) to
and leave everything else as is. But "CanCapture" calls "GroupsAround", "NewGroup" and "forAllSites", so it doesn't narrow it down much. My guess is that the problem is with the use of (is Connected) in "GroupsAround", because I have never used this ludeme. I must experiment with it to see how it is supposed to work.
Edit: Ah! I forgot the curly brackets in "(sites {(to)})" in "NewGroup". It compiles with them, but I have made a mistake somewhere. I am not allowed to capture.. Still guessing I'm misunderstanding (is Connected).
Code:
(define "NoFriendlyAdjacent"
(=
0
(count Sites in:(sites Around (site) Own))
)
)
It seems the error is caused by "CanCapture". It compiles if I change the to-parameter in (move Add) to
Code:
(to
(forEach
(sites Empty)
if:("NoFriendlyAdjacent")
)
)
Edit: Ah! I forgot the curly brackets in "(sites {(to)})" in "NewGroup". It compiles with them, but I have made a mistake somewhere. I am not allowed to capture.. Still guessing I'm misunderstanding (is Connected).