06-23-2021, 02:08 PM
Okay I have picked this up again. I enclose a .lud file and a trial.
![[Image: pic6244030.png]](https://cf.geekdo-images.com/4fgLu9W78Aq-Q01sbitKEQ__imagepage/img/BaJGUX2U8CKGjCxhE-Jh51D3wLo=/fit-in/900x600/filters:no_upscale():strip_icc()/pic6244030.png)
I am hoping I can get at whether I am using "forEach Group" correctly by using corresponding syntax for "count Groups". So in the Test Ludeme Dialog I am testing the following code:
So for A, P1 (Yellow) I would expect 1.
For B, P1 (Red) I would expect 1.
For A, P2 (Teal) I would expect 2.
For B, P2 (Black) I would expect 0.
However for all of these I get 0. Also when I do this, my Ludii writes out to the console: "** Could not compile game.util.math.Count."
However if just ask for the Test Ludeme Dialog to calculate
it returns 2, which is what I would expect. However it still gives the error message: "** Could not compile game.util.math.Count."
![[Image: pic6244030.png]](https://cf.geekdo-images.com/4fgLu9W78Aq-Q01sbitKEQ__imagepage/img/BaJGUX2U8CKGjCxhE-Jh51D3wLo=/fit-in/900x600/filters:no_upscale():strip_icc()/pic6244030.png)
I am hoping I can get at whether I am using "forEach Group" correctly by using corresponding syntax for "count Groups". So in the Test Ludeme Dialog I am testing the following code:
Code:
(count
Groups
Cell
Adjacent
if:(= (id #1 #2) (what at:(to)))
)
#1 - "A" or "B"
#2 - P1 or P2
So for A, P1 (Yellow) I would expect 1.
For B, P1 (Red) I would expect 1.
For A, P2 (Teal) I would expect 2.
For B, P2 (Black) I would expect 0.
However for all of these I get 0. Also when I do this, my Ludii writes out to the console: "** Could not compile game.util.math.Count."
However if just ask for the Test Ludeme Dialog to calculate
Code:
(count
Groups
Cell
Adjacent
)