11-12-2020, 09:07 AM
Hi,
For the syntax of the Add ludeme you have many examples in the Ludii Game Logic Guide and explanation of how to use it.
The last one (example ludeme 37) shows you how to describe what you want (to add pieces to a region and to have a condition on the sites you can add).
For what you ask to add pieces to empty sites only if 2 orthogonal adjacent sites are owned by you, here an example:
Regards,
Eric
For the syntax of the Add ludeme you have many examples in the Ludii Game Logic Guide and explanation of how to use it.
The last one (example ludeme 37) shows you how to describe what you want (to add pieces to a region and to have a condition on the sites you can add).
For what you ask to add pieces to empty sites only if 2 orthogonal adjacent sites are owned by you, here an example:
Code:
(game "Test"
(players 2)
(equipment {
(board (hex 3))
(piece "Ball" Each)
})
(rules
(start {
(place "Ball1" (sites {14 10}))
(place "Ball2" (sites {8 3}))
})
(play
(move Add
(to (sites Empty)
if:(<= 2 (count Sites in:(sites Around (to) Own Orthogonal)))
)
)
)
(end (if (no Moves Next) (result Mover Win)))
)
)
Regards,
Eric