Ludii Forum
A problem with the Triangle and isLine command - 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: A problem with the Triangle and isLine command (/showthread.php?tid=55)



A problem with the Triangle and isLine command - Johnlanders - 05-13-2020

Hi, I'm trying to work with triangle tile for a board. So first I try to simply modify the Tic-Tac-Toe, allow the intersections with intersections:true and check the win by an isLine ludeme, here is the code of this little test : 

Code:
(game "Tic-Tac-Toe" 
    (players 2) 
    (equipment {
        (board (triangle 4) intersections:true)
        (piece "Disc" P1)
        (piece "Cross" P2)
        }
    ) 
    (rules
        (play (add (empty)))
        (end (if (isLine 3) (result Mover Win)))
    )
)

Then I try to play the game and this happen : Image

As you can see in the image the game finished as a draw, even with the alignement of three pieces. Then I try using the customBoard function to draw some kind of triangle and the isLine is working, but the board doesn't look very good. Is there a bug for the triangle parameter or have I miss something ?

Thank by advance


RE: A problem with the Triangle and isLine command - cambolbro - 05-13-2020

Hi,

Yes there's a bug in our current triangular tiling Sad

If you look at the cell indices you'll see there's a problem with the ordering.

We'll be doing a revamp of the board descriptions soon, including improved and more powerful descriptions. We hope to have this done for the 1.0.0 release (scheduled for end of June).

Regards,
Cameron


RE: A problem with the Triangle and isLine command - Johnlanders - 05-13-2020

Thanks for the information, I'll continue to work with customBoard ludeme.