What is the syntax for the <to> ludeme if I want to restrict the (move add...) ludeme to only allow the Mover legal moves that add to an empty cell AND at least 2 of the orthogonally adjacent cells to that empty cell contain pieces that are the same as the Mover's piece being added at that to location?
I am considering using an "and" operator to restrict:
(play (move Add (to (sites Empty))))
to look something like this:
(play (move Add (to (sites (and Empty (>= (count Pieces Mover in: orthogonal) 2 ) ))))
The count needs to only count the Mover's pieces that are in the orthogonally adjacent region around the empty to cell. Did I identify that correctly?
Also, it needs to count the orthogonally adjacent cell U (in the layer upwards from) and D (in the layer downards from) the empty to cells of the legal moves. How can they get included in the region being counted?
Is this count even possible?
Please help!
I am considering using an "and" operator to restrict:
(play (move Add (to (sites Empty))))
to look something like this:
(play (move Add (to (sites (and Empty (>= (count Pieces Mover in: orthogonal) 2 ) ))))
The count needs to only count the Mover's pieces that are in the orthogonally adjacent region around the empty to cell. Did I identify that correctly?
Also, it needs to count the orthogonally adjacent cell U (in the layer upwards from) and D (in the layer downards from) the empty to cells of the legal moves. How can they get included in the region being counted?
Is this count even possible?
Please help!
Best Regards,
Woody
Woody