Ludii Forum
number of friendly pieces in line of sight - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15)
+--- Thread: number of friendly pieces in line of sight (/showthread.php?tid=159)

Pages: 1 2 3 4 5


RE: number of friendly pieces in line of sight - Michael - 09-28-2020

Haha. I found some time to tweak your code, but I was in such a hurry I posted it to the wrong thread. Here is a link (I’m not at my computer, so I can’t re-upload). I might have time to explain some og the changes later.

Edit: I have attached a cleaner version.

It's nagging me that (move Remove) doesn't have a <from> parameter. And it should have had either a "count:" parameter or a "stack:"-parameter so one could remove more than one piece. If it did, the code would have been very elegant (after phase 1, which is lacking here also):  (move Remove (from "PlayableSites") stack:true (then (add …))) But I had to use (move Select) and (remove).

The good news is that the "count:"-parameter on (add) works when you do it this way. The bad news is that (remove) also lacks a "count:" or "stack:"-parameter. I have tried to simulate removing a stack with (move (from "PlayableSites") (to Off) stack:true (then (add …))) but it is either not possible to move to Off (-1) or it is not possible to move from an empty site. I also can't find a way to iterate over the pieces in a stack, to remove them "one by one" so to speak.


RE: number of friendly pieces in line of sight - Michael - 09-29-2020

Here is a functional workaround while we are waiting. The difference from using (remove) with count: is only graphical. If I'm not confused..


RE: number of friendly pieces in line of sight - MikeZapawa - 09-29-2020

(09-29-2020, 11:40 AM)Michael Wrote: Here is a functional workaround while we are waiting. The difference from using (remove) with count: is only graphical. If I'm not confused..

So is this essentially a workable version of Tumbleweed?


RE: number of friendly pieces in line of sight - Michael - 09-29-2020

It doesn’t have the correct start-up rules and the game can’t be ended before there are no moves left. Otherwise it’s the same game. It’s just that you don’t replace the entire stack. Instead you add your pieces until it is the right size.


RE: number of friendly pieces in line of sight - MikeZapawa - 09-29-2020

(09-29-2020, 02:22 PM)Michael Wrote: It doesn’t have the correct start-up rules and the game can’t be ended before there are no moves left. Otherwise it’s the same game. It’s just that you don’t replace the entire stack. Instead you add your pieces until it is the right size.

There doesn't seem to be any visible distinction between stack height -- stacks are only visible after captures or recaptures, and each move reads as "add dics". Is it just a problem with presentation?


RE: number of friendly pieces in line of sight - Michael - 09-29-2020

Do you have Ludii version 1.0.7? It runs fine here.


RE: number of friendly pieces in line of sight - MikeZapawa - 09-29-2020

(09-29-2020, 02:59 PM)Michael Wrote: Do you have Ludii version 1.0.7? It runs fine here.
Running it on 1.0.7, yes. Looks like this:

[Image: pic5686516.png]

Captures seem to work as intended, though.


RE: number of friendly pieces in line of sight - Michael - 09-29-2020

[Image: pic5686525.png]
This is how it looks at my end. I'll reupload. Maybe I uploaded the wrong file.


RE: number of friendly pieces in line of sight - MikeZapawa - 09-29-2020

(09-29-2020, 03:22 PM)Michael Wrote: [Image: pic5686525.png]
This is how it looks at my end. I'll reupload. Maybe I uploaded the wrong file.

It's the same file, but notice how you NEVER get multi-stacks without reinforcing.


RE: number of friendly pieces in line of sight - Michael - 09-29-2020

Damn! How could I not have noticed? I can't fix it right now, but i'll try to get back to it later today.

Edit: Try this.