09-07-2022, 07:16 AM
(08-22-2022, 07:45 AM)Michael Wrote: Ok, here is finally some concrete examples of my issue. The basic interaction here is that one swaps the position of the Disc with any one of the colored Squares (select the Disc, then select a Square). The wanted result is that the two selected pieces swap positions and the Square is in the same state as it was before the swap.
In "1-SwapDoesNotPreserveState.lud" I only use swap and do not manage state manually.
"2-SwappingAndLosingState.trl" is a trial showing that the pieces swap positions, but the Square is not in the same state after the swap.
In "3-StateCannotBeManuallySetAfterSwapEither.lud" I try to remedy this by manually keeping track of and setting the state.
"4-ManuallySettingState.trl" is a trial showing that the ludeme that is supposed to set the state explicitly is ignored.
The "state:" argument in (piece) works now, thats great! Thanks :)
However, the issues quoted above are untouched.
I can work around them by using the state-argument in (piece), but you might want to look into it, as there seems to be a big somewhere.
I'm not entirely sure how (swap Pieces) is supposed to work (if it's supposed to preserve state), but the other issue (exemplified in files 3-… and 4-…) definitely seem like a bug.