01-06-2021, 01:24 AM
(This post was last modified: 01-06-2021, 02:16 AM by slimy_asparagus.)
(01-05-2021, 04:51 PM)Eric Piette Wrote: I advise you to define this hop move in the piece generator and to use (forEach Piece).
Eric,
Earlier in the thread you advised me to move the "SameTurn" out of the piece generator into the <play> section:
(01-04-2021, 09:13 AM)Eric Piette Wrote: That "SameTurn" check, should not be in the piece generator but in the (play ...) with the (move Pass ...) because that move is not related to each piece but to the last piece moved.I was in the process of attempting to do that, but I hit the current problem before I ever got as far as putting the "SameTurn" check back in.
That is why I am now presenting you with my attempt to put a "move Hop" in the <play> section.
You are telling me to do A, and then when that fails, telling me to do B. And when B fails you tell me to do A.
Now as it happens I can see a way to do it either way.
If I am going to put everything in the <play> section, then I need to know how to make "move Hop" work there. I have reread your explanation and I think I get what you are trying to say. However I was not able to use it to make "move Hop" work in the play section. In particular why can I make a "move <from> <to>" work in the <play> section but not a "move Hop"?
If I am going to put everything in the piece generator, then I need to have only one sort of piece for each player (so it is like the example in the Pass Dialog thread) and I will simply distinguish major and minor versions of the piece by their state (or perhaps value).
However that seems to hit an issue. For this approach to work I believe I need to do something like:
Code:
// #1 - Name of piece
(define "MinorPieceGraphics"
(piece Rename piece:#1 "disc" state:0)
)
(define "MajorPieceGraphics"
(piece Rename piece:#1 "pawn" state:1)
)
So we rename the piece differently depending on the state.
So which of these two approaches is more feasible?
1. having "move Hop" in the <play> section
2. having Rename take "state" into account.