08-16-2020, 02:04 AM
(This post was last modified: 08-16-2020, 03:58 AM by dale walton.
Edit Reason: Thought I solved it, but still have a problem.
)
2nd Edit: Actually not solved - It is only checking from the last placed opponent's piece - I need to exclude LOS from ALL opponent's pieces.
Edit: #1) I Solved: - should have been: (sites To (move (from (sites Occupied by:Next)) (to (sites LineOfSight Empty))))
Sorry for the inconvenience.
====================
1) Please tell me what is wrong with this code:
(play
(move
Add
(to
(difference
(sites Empty)
(sites To (forEach Piece (move (to (sites LineOfSight Empty)) Next )))
)
)
)
)
I get:
Unexpected syntax '(to (sites LineOfSigh...' in '(move (to (sites LineOfSight ...'.
I am trying to disallow movement to sites where an opponent has a line of sight.
Despite what the error says, the "Next" triggers it.
-----------------------------------------------------------------
2) I have some games where players place both colors but score their own, and (move <from> <to> <player>) seems to be the only form that handles this, so I need to know its limitations.
3) I also separately want to know what happens under LOS if there are tiles on the board?
Edit: #1) I Solved: - should have been: (sites To (move (from (sites Occupied by:Next)) (to (sites LineOfSight Empty))))
Sorry for the inconvenience.
====================
1) Please tell me what is wrong with this code:
(play
(move
Add
(to
(difference
(sites Empty)
(sites To (forEach Piece (move (to (sites LineOfSight Empty)) Next )))
)
)
)
)
I get:
Unexpected syntax '(to (sites LineOfSigh...' in '(move (to (sites LineOfSight ...'.
I am trying to disallow movement to sites where an opponent has a line of sight.
Despite what the error says, the "Next" triggers it.
-----------------------------------------------------------------
2) I have some games where players place both colors but score their own, and (move <from> <to> <player>) seems to be the only form that handles this, so I need to know its limitations.
3) I also separately want to know what happens under LOS if there are tiles on the board?