11-02-2020, 09:15 AM
Hi,
your define "MoveWithinBoard" using a step move needs to know from where you can step. That is expressed by the (from) ludeme. However that ludeme needs to iterate each piece. That's what is doing by (forEach Piece). That ludeme described like that refers to each piece owned by the mover and look where they are placed to compute the moves described in each piece in modifying the value of (from) by the place of the piece. That's why the moves description of that ludeme should be at a piece level. However, that's also possible to put that description directly in the play rules in doing (forEach Piece "MoveWithinBoard").
But that's better to describe the moves belonging to a piece directly in the description of the piece in our opinion.
The other define "MoveOntoBoard" refers from a set of sites to another. Consequently the moves do not belong to a specific pieces and is better to be directly in the playing rules rather than the pieces themselves.
Minor remark about it, you currently does not check if some pieces are still in the hand of the mover. Consequently that's possible to move from an empty sites to any outer sites.
A more accurate description can be:
(move
(from (sites Occupied by:Mover container:(mover)))
(to (sites Outer))
)
Another minor comment is for
(hand Each size:1)
the "size:1" is the default parameter, consequently just (hand Each) is enough.
Concerning that "Player 2 picks up player 1's piece rather than its own." I am not sure of what should happen in that game, but if you can put your piece on top of an enemy piece and then be able to move that stack only if the top piece is to you you can use (forEach Piece top:true).
Regards,
Eric
your define "MoveWithinBoard" using a step move needs to know from where you can step. That is expressed by the (from) ludeme. However that ludeme needs to iterate each piece. That's what is doing by (forEach Piece). That ludeme described like that refers to each piece owned by the mover and look where they are placed to compute the moves described in each piece in modifying the value of (from) by the place of the piece. That's why the moves description of that ludeme should be at a piece level. However, that's also possible to put that description directly in the play rules in doing (forEach Piece "MoveWithinBoard").
But that's better to describe the moves belonging to a piece directly in the description of the piece in our opinion.
The other define "MoveOntoBoard" refers from a set of sites to another. Consequently the moves do not belong to a specific pieces and is better to be directly in the playing rules rather than the pieces themselves.
Minor remark about it, you currently does not check if some pieces are still in the hand of the mover. Consequently that's possible to move from an empty sites to any outer sites.
A more accurate description can be:
(move
(from (sites Occupied by:Mover container:(mover)))
(to (sites Outer))
)
Another minor comment is for
(hand Each size:1)
the "size:1" is the default parameter, consequently just (hand Each) is enough.
Concerning that "Player 2 picks up player 1's piece rather than its own." I am not sure of what should happen in that game, but if you can put your piece on top of an enemy piece and then be able to move that stack only if the top piece is to you you can use (forEach Piece top:true).
Regards,
Eric