Ludii Forum
Selecting from and to - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Ludii Player Problems (https://ludii.games/forums/forumdisplay.php?fid=6)
+--- Thread: Selecting from and to (/showthread.php?tid=359)



Selecting from and to - Michael - 01-08-2021

I was just fooling around when I realized a problem with selecting the to and from sites for (move Select) if the to and from regions are the same. In the attached example you select from (sites Board) and to (sites Board). When I simply click a site, Ludii thinks I have selected it as both to and from. I'm guessing it's treating my imput as if I dragged from a site to that same site. But it should be possible to click two sites instead of dragging, right? So the player needs to understand the difference between clicking and dragging "on the spot" (which shouldn't be a thing).


RE: Selecting from and to - MatthewStephenson - 01-11-2021

Hi Michael,

This is caused by the fact that clicking on that spot is also a legal move. In cases like this, the piece must be dragged to the intended site.

If you have a good solution for this please let us know and we will consider it Smile

Cheers,
Matthew


RE: Selecting from and to - Michael - 01-11-2021

That's what I thought. How about interpreting the input as dragging only if one moves the pointer while the button is pressed down? I guess it always moves a tiny bit, but demand more movement to read it as dragging.


RE: Selecting from and to - MatthewStephenson - 01-11-2021

Hi Michael,

This approach would mean that moves with involve clicking on a piece to make the move, would now have to involve the player dragging the piece off its site and back onto it. I'm not sure what this would solve, as players would still need to drag their piece to make a move, just the other way around.

Is this what you are suggesting?


RE: Selecting from and to - slimy_asparagus - 01-11-2021

Have you considered right-click bring up a menu?


RE: Selecting from and to - Michael - 01-11-2021

(01-11-2021, 03:13 PM)MatthewStephenson Wrote: Hi Michael,

This approach would mean that moves with involve clicking on a piece to make the move, would now have to involve the player dragging the piece off its site and back onto it. I'm not sure what this would solve, as players would still need to drag their piece to make a move, just the other way around.

Is this what you are suggesting?
No. I'm suggesting that dragging must involve actual dragging, and clicking is plain clicking. If clicking twice on the same location is a legal move, one should have to click twice. If one wants to drag it there, then one would have to click-and-hold and move it a tiny bit (for example off and onto the site again, but no need for it to take that much movement), then release the button over the relevant site. This is a way to distinguish clicking and dragging.


RE: Selecting from and to - MatthewStephenson - 01-11-2021

Hi Michael,

In Ludii we do not treat the action of clicking on a site as a "drag", however if there is a legal move that involves making a move from the clicked site and to the clicked site, we perform this move.
This is the same behaviour as placing a piece in a game like tic-tac-toe. In this case, selecting a site performs a move from this site to the same site.

In a more formal sense the rules for making moves are as follows:
1. If you drag a piece from one site to a different site, we attempt to make a move corresponding to the dragged sites.
2. If you click on a site then either:
a. If there is a legal move from that site to the same site, we make that move
b. If (a) is not true, and a piece is not selected, then we select that piece
c. If neither a. nor b. is true, we attempt to make a move between the (previously) selected site and the clicked site


RE: Selecting from and to - Michael - 01-11-2021

Ok. I misunderstood, then. Sorry. How about changing 2a to "If the only legal move from this site is to this same site …


RE: Selecting from and to - MatthewStephenson - 01-11-2021

Hi Michael,

Sorry I also missed a step, but I think I see what you are suggesting.

2.c. should have had the clarification that this is only done if the two sites are different, otherwise we un-select the piece.

Are you saying that for the case where I want to make the "click" move. I should have to click the piece twice? Currently this would un-select the selected piece.


RE: Selecting from and to - Michael - 01-11-2021

(01-11-2021, 05:05 PM)MatthewStephenson Wrote: Hi Michael,

Sorry I also missed a step, but I think I see what you are suggesting.

2.c. should have had the clarification that this is only done if the two sites are different, otherwise we un-select the piece.

Are you saying that for the case where I want to make the "click" move. I should have to click the piece twice? Currently this would un-select the selected piece.
If a move is determined by a from- and a to-site (or a piece and a site, or two pieces, what have you), I am suggesting that one can input this by selecting the from-site, then clicking the to-site. So one will be clicking a site twice if one and the same site is both to and from, yes. Unselecting can be clicking anywhere else than at an eligible to-site. Or something like that. I understand that the generality of Ludii makes it difficult, so I don't really understand what the relevant challenges are. It's just very unintuitive that I can't use clicking in my example file when the move is based on selecting two sites.