Ludii Forum
Moving stacks with (stackType Count) - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About Ludii (https://ludii.games/forums/forumdisplay.php?fid=14)
+--- Thread: Moving stacks with (stackType Count) (/showthread.php?tid=667)



Moving stacks with (stackType Count) - Michael - 08-06-2021

If a game where you move stacks allow you to move any number of pieces from the top of the stack (between 1 and the stack-size), the interface for this is very natural and nice when using stackType Default. But is there really no way of moving more than the top piece of a stack when using stackType Count? I expected a window to pop up with options, but I couldn't find any way of moving more than the top piece.

Edit: One way of doing this could be to have a stackType that both shows the pieces (as in default) and has the number of pieces in the stack printed on the top piece. I think two variants of this could be useful: One exactly like I just described, and one almost exactly like that, except all the pieces in a stack are shown with the color of the top stack. Combined with a low scaling factor, this would be very much like Count, but with the pieces spread out a bit so one can click them individually.

I realize that there might be limited use for the option to show all the pieces of a stack in the color of the top piece. But at the moment I'm exploring a game where the different colors in the mixed stacks is only visual clutter and makes no difference for gameplay, so I know that the use for this feature is not completely nonexistent. (Another example is Tumbleweed, actually, if one wanted to show the stacks as stacks. The way it is implemented now, showing the stacks as stacks would reveal that they are mixed, and this would only make things look messy.)


RE: Moving stacks with (stackType Count) - MatthewStephenson - 08-18-2021

Hi Michael,

I've added in a new stack type "DefaultAndCount" which simply uses the default stack type with the count added on top.

Currently with how things are modeled in Ludii its not possible to change the colours of pieces based on the properties of other pieces in their stack. The (easiest) way that I can think around this would be to set the owner of the lower pieces in the stack to that of the piece on top. This might be what you want to achieve anyway?

Cheers,
Matthew


RE: Moving stacks with (stackType Count) - Michael - 08-18-2021

Thanks, that's helpful!