09-06-2020, 09:28 AM
Hi,
Thanks for that explanation :)
Ok so I guess if you know the number of pieces you have to place before to play your first move, you should be able to check each empty sites with a (forEach Site ...) ludeme and use a condition on each of these sites according to the number of empty sites belonging to a group starting from that site.
With your example with 2 pieces to place and the site surrounded by pieces.
In checking each site in (sites Empty) if we look the size of the group of empty sites starting for each site and keep only the sites that will be equal or more than 2 except for the site surrounded by pieces.
Consequently something like
(move Add (forEach Site (sites Empty) if:(<= 2 (count Sites in:(sites Group (site) if:(is Empty (to)))))))
can work. (in replacing that 2 by the number of pieces you can place for a more general case)
But unfortunately, like I just answered to you in another post, our ludeme (sites Group ...) seems not completely implemented currently.
So I will take a look next week in order to fix that for the next release.
I will come back to you when that will be done and published, and I will also provide to you a simple .lud file with an example of description doing that.
And by the way, sorry for that delay to answer to you, I officially come back from holidays tomorrow :)
Regards,
Eric Piette
Thanks for that explanation :)
Ok so I guess if you know the number of pieces you have to place before to play your first move, you should be able to check each empty sites with a (forEach Site ...) ludeme and use a condition on each of these sites according to the number of empty sites belonging to a group starting from that site.
With your example with 2 pieces to place and the site surrounded by pieces.
In checking each site in (sites Empty) if we look the size of the group of empty sites starting for each site and keep only the sites that will be equal or more than 2 except for the site surrounded by pieces.
Consequently something like
(move Add (forEach Site (sites Empty) if:(<= 2 (count Sites in:(sites Group (site) if:(is Empty (to)))))))
can work. (in replacing that 2 by the number of pieces you can place for a more general case)
But unfortunately, like I just answered to you in another post, our ludeme (sites Group ...) seems not completely implemented currently.
So I will take a look next week in order to fix that for the next release.
I will come back to you when that will be done and published, and I will also provide to you a simple .lud file with an example of description doing that.
And by the way, sorry for that delay to answer to you, I officially come back from holidays tomorrow :)
Regards,
Eric Piette