Ludii Forum
two colours per player of the same basic piece; or custom piece graphics - 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: two colours per player of the same basic piece; or custom piece graphics (/showthread.php?tid=1773)



two colours per player of the same basic piece; or custom piece graphics - th5555 - 02-22-2024

Hello,

I'm trying to program a game where each player has pieces of 2 colours. So for example I want P1 to have a red disc and a blue disc, and P2 to have a green disc and a yellow disc, and on their turn they can place one of their pieces. How can I do this?

Somewhat related, I was trying to create a custom piece by defining a piece without graphics with just an arbitrary name in the equipment, e.g.
Quote:(piece "asdf" P1)
and then drawing the actual graphics in the graphics metadata, e.g.
Quote:        (piece
        Background
        "asdf"
        image:"octagon"
        fillColour:(colour Red)
        edgeColour:(colour Blue)
        )
, which works fine except the letter "A" (first letter of "asdf" I guess) is added to the graphic and I don't know how to get rid of it.

Any help would be greatly appreciated.


PS before miraculously remembering my password again I tried to reset it, but the reset password emails don't seem to be arriving.