Ludii Forum
Large pieces - 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: Large pieces (/showthread.php?tid=229)

Pages: 1 2


Large pieces - Michael - 10-31-2020

I'm trying to make a large piece that's a hexagon consisting of three rhombuses on the dual of tiling T3636. But I want the internal composition of the piece to be immaterial, in the sense that it only matters that the edges align. It's ok if it has to be dragged onto the board. Is this possible?

I'm attaching a mess of a try where one has to choose the right option from a pop-up screen in order to place a hex as intended.


RE: Large pieces - Eric Piette - 11-02-2020

Hi,

I am not sure to understand what you try to do. Can you give us more details and explanation?
Do you have a picture of what should be "a large piece that's a hexagon consisting of three rhombuses on the dual of tiling T3636"?

We did not designed the large pieces for non regular boards, consequently I am not sure, that's can be used with them right now.

Regards,
Eric


RE: Large pieces - Michael - 11-02-2020

[Image: pic5753774.png]
These are three large hexagons on the relevant board. I want it to be legal to place such a piece anywhere as long as the edges align with the lines on the board.


RE: Large pieces - Michael - 11-05-2020

I think I have found the most ridiculous workaround ever. It involves this giant conditional direction:
Code:
(define "ConditionalDirection"
    (if
        (or {
            (and {
                (and {
                    (is Empty (ahead (from) NNW))
                    (is Empty (ahead (from) NNE))
                    (is Related Orthogonal
                        (ahead (from) NNW)
                        (ahead (from) NNE)
                    )
                })
                (and {
                    (is Empty (ahead (from) SSE))
                    (is Empty (ahead (from) SSW))
                    (is Related Orthogonal
                        (ahead (from) SSE)
                        (ahead (from) SSW)
                    )
                })
            })
            (and {
                (and {
                    (is Empty (ahead (from) NNW))
                    (is Empty (ahead (from) W))
                    (is Related Orthogonal
                        (ahead (from) NNW)
                        (ahead (from) W)
                    )
                })
                (and {
                    (is Empty (ahead (from) SSE))
                    (is Empty (ahead (from) E))
                    (is Related Orthogonal
                        (ahead (from) SSE)
                        (ahead (from) E)
                    )
                })
            })
            (and {
                (and {
                    (is Empty (ahead (from) NNE))
                    (is Empty (ahead (from) E))
                    (is Related Orthogonal
                        (ahead (from) NNE)
                        (ahead (from) E)
                    )
                })
                (and {
                    (is Empty (ahead (from) SSW))
                    (is Empty (ahead (from) W))
                    (is Related Orthogonal
                        (ahead (from) SSW)
                        (ahead (from) W)
                    )
                })
            })
        })
        Orthogonal
        (if
            (and {
                (is Empty (ahead (from) NNW))
                (is Empty (ahead (from) NNE))
                (is Related Orthogonal
                    (ahead (from) NNW)
                    (ahead (from) NNE)
                )
            })
            (directions {NNW NNE})
            (if
                (and {
                    (is Empty (ahead (from) SSE))
                    (is Empty (ahead (from) SSW))
                    (is Related Orthogonal
                        (ahead (from) SSE)
                        (ahead (from) SSW)
                    )
                })
                (directions {SSE SSW})
                (if
                    (and {
                        (is Empty (ahead (from) NNW))
                        (is Empty (ahead (from) W))
                        (is Related Orthogonal
                            (ahead (from) NNW)
                            (ahead (from) W)
                        )
                    })
                    (directions {NNW W})
                    (if
                        (and {
                            (is Empty (ahead (from) SSE))
                            (is Empty (ahead (from) E))
                            (is Related Orthogonal
                                (ahead (from) SSE)
                                (ahead (from) E)
                            )
                        })
                        (directions {SSE E})
                        (if
                            (and {
                                (is Empty (ahead (from) NNE))
                                (is Empty (ahead (from) E))
                                (is Related Orthogonal
                                    (ahead (from) NNE)
                                    (ahead (from) E)
                                )
                            })
                            (directions {NNE E})
                            (directions {SSW W})
                        )
                    )
                )
            )
        )
    )
)
But because of this error with (is Related) I have coded blindly, so I don’t yet know if it works. There is also the possible direction function bugs to consider.. I just can’t let go of a challenge.


RE: Large pieces - Eric Piette - 11-06-2020

Hi,

Yeah I fixed the two others posts you did now, keep me aware after the next release (not for this week).

Regards,
Eric


RE: Large pieces - Michael - 11-06-2020

Great news about the bugs. Thanks, Eric!

I still wish there was a way to define a large piece in terms of its outer shape, and not its internal composition, though. If my workaround works, it only works for a limited class of games.


RE: Large pieces - Eric Piette - 11-06-2020

Hi Michael,

Yes in the future I guess we will do something to improve the definition of the large pieces for such cases. But that's not planned for the moment, if any improvement is done in that direction I will warn you.

Regards,
Eric


RE: Large pieces - Michael - 11-18-2020

My "MonsterWorkAround.lud" compiles but gives the error message "VC_ERROR: Error detected when attempting to draw POSSIBLEMOVES". What does this mean?


RE: Large pieces - Eric Piette - 11-19-2020

That means a highly probably bug in the code ^^
Can you share the last .lud you did to check?

Regards,
Eric


RE: Large pieces - Michael - 11-19-2020

It's the same as I shared before the update to 1.1.1 (I think).