Ludii Forum
Swap bug and others... - Printable Version

+- Ludii Forum (
+-- Forum: Problems (
+--- Forum: Game Problems (
+--- Thread: Swap bug and others... (/showthread.php?tid=614)

Swap bug and others... - dale walton - 06-21-2021

Over the weekend I scripted Resolve for Alek and it is now working, but I ran into a few problems.

One clear problem was with swap. The attached script has an option to run a working define and to run a define using swap to do the same thing.

I have attached a picture of the result using swap.

Two separate issues:

1) it would be nice if one didn't have to re-select the from location on the "moveAgain"s -- There used to be a player option for this, but I can no longer find it. Meta Automove is no help - it selcts everything. So....

A new feature request:

in the (from) statement could you provide an option (from .... autoSelect:None/Unique/All ) to put this in the scriptwriter's control... 

This would tell the system to either

None: require selection by the user (default)
Unique: require selection from the user if there is more than one option, but automatically apply the selection is there is only one possibility
All: select every possibility (like your automove, but limited to the particular from statement.)

2) I got funny results when trying to use Pending instead of setting the value as a variable -- probably my using it wrong, but you might see if there are bugs on your side -- low prioity
Might have to do with the way I am using (results)