11-21-2020, 04:29 PM
(This post was last modified: 11-21-2020, 05:54 PM by slimy_asparagus.)
In an earlier thread, Eric said:
I still don't get this.
I am attaching test files. One works, the other doesn't. The one that fails, compiles but will not allow me to move the pieces onto the board. Instead it brings up the preferences dialog. My one question is:
Can I move the "MoveOntoBoard" construct into the piece definition (like in test-fails.lud) so it works like in (test-works.lud)? If not why not?
The problem I am having now is that I am trying to introduce the differences between the different sorts of pieces. The natural place for those is in the piece definition hence why I am trying to move all movement definitions there.
The only alternatives I can see is setting a value in each piece definition and then having logic running off that value. That seems quite unnatural and probably less efficient. Ludii does not seem to have a notion of "attribute", which would also be a workable solution for me. I can simulate it using maps or perhaps division and remainder but it would all be clunky.
For a specific example, in this thread I have introduce a map. I would not need if the "MoveOntoBoard" usage could go in the piece definition, because then I could pass a parameter through the macro.
Also in test-fails.lud it allows Pass. It should not allow Pass. I would ask how to prevent that, but I have used up my quota of questions.
(11-02-2020, 09:15 AM)Eric Piette Wrote: 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.
I still don't get this.
I am attaching test files. One works, the other doesn't. The one that fails, compiles but will not allow me to move the pieces onto the board. Instead it brings up the preferences dialog. My one question is:
Can I move the "MoveOntoBoard" construct into the piece definition (like in test-fails.lud) so it works like in (test-works.lud)? If not why not?
The problem I am having now is that I am trying to introduce the differences between the different sorts of pieces. The natural place for those is in the piece definition hence why I am trying to move all movement definitions there.
The only alternatives I can see is setting a value in each piece definition and then having logic running off that value. That seems quite unnatural and probably less efficient. Ludii does not seem to have a notion of "attribute", which would also be a workable solution for me. I can simulate it using maps or perhaps division and remainder but it would all be clunky.
For a specific example, in this thread I have introduce a map. I would not need if the "MoveOntoBoard" usage could go in the piece definition, because then I could pass a parameter through the macro.
Also in test-fails.lud it allows Pass. It should not allow Pass. I would ask how to prevent that, but I have used up my quota of questions.