Ludii Forum
issue with is Connected - 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: issue with is Connected (/showthread.php?tid=416)



issue with is Connected - fbarbe - 02-04-2021

Hi,
I am currently trying to write the game "Duplohex" from the Ludii wishlist (with high priority).
I would consider my code complete, but it does not behave as I would expect.

Note that the rules of the game slightly differ from version to version, and I've implemented it as described in BGG. The goal is, like Hex, to connect two extremities of the board with the same colour. Unlike Hex, however, each player has different types of pieces.
I am using the (is Connected) ludeme for the end condition, but it does not seem to detect the line as expected (see screenshot attached). Btw, the LudiiLanguageReference pdf has the ludeme (isConnected) at page 357 which does not seem to exist (does not compile.).

Am I doing anything wrong? You'll find my code attached as well.

Kind Regards,
Fabio


RE: issue with is Connected - Eric Piette - 02-05-2021

Hi,

You are doing nothing wrong :)
The ludeme (is Connected ...) was looking for the piece index/type rather than the owner of the piece as it should be.
So I have fixed it and the game you did works as expected.

So I will add it to our games and it will be in the next release.
Thanks for that.


RE: issue with is Connected - cambolbro - 02-05-2021

Hi Fabio,

Good work once again. 

I know the designer of DuploHex (Jose from Madrid), he'll be thrilled that it's been implemented.

Regards,
Cameron