11-20-2020, 08:03 AM
Hi,
I advice you to look also the Ludii Game Logic Game (LGLG) available in the download page given more explanation about the logic for designer. The Language Reference (LR) is a document generated automatically from the documentation in the code corresponding to each ludeme in Java contrary to the Lugii Game Logic Game written by us and completed according to the comments of the users and at each release.
Concerning your questions:
- A map is a part of the equipment, the syntax to define some is in the two documents. In mathematics, a mapping is an operation that associates each element of a given set (the domain) with one or more elements of a second set (the range). In Ludii, it is used to associate 2 integers. So yes you can create your own maps in the equipment.
- The flips are also explained in the LGLG document, I leave you looking at it, but they have no link with the value of a piece.
For the value you already find some answers but not the last one.
To find pieces of a specific value, you can iterate all the sites occupied by a certain player with a (forEach ...) ludeme with a condition in it to get only the pieces with a certain value.
Something like
(forEach (sites Occupied by:Mover) if:(= (value Piece of:(what at:(site))) 4))
Will give you all the sites occupied by the mover with a piece value of 4.
If you have a stack, that's more complex and you can not return a specific site (because you have many pieces on it). So just depend what you want to do with it.
For the pending, that's exactly that. But yes I have to add a short explanation in the LGLG, that will be done.
I really advice you to ask one question in each forum message for us to be able to answer to it more easily.
Regards,
Eric
I advice you to look also the Ludii Game Logic Game (LGLG) available in the download page given more explanation about the logic for designer. The Language Reference (LR) is a document generated automatically from the documentation in the code corresponding to each ludeme in Java contrary to the Lugii Game Logic Game written by us and completed according to the comments of the users and at each release.
Concerning your questions:
- A map is a part of the equipment, the syntax to define some is in the two documents. In mathematics, a mapping is an operation that associates each element of a given set (the domain) with one or more elements of a second set (the range). In Ludii, it is used to associate 2 integers. So yes you can create your own maps in the equipment.
- The flips are also explained in the LGLG document, I leave you looking at it, but they have no link with the value of a piece.
For the value you already find some answers but not the last one.
To find pieces of a specific value, you can iterate all the sites occupied by a certain player with a (forEach ...) ludeme with a condition in it to get only the pieces with a certain value.
Something like
(forEach (sites Occupied by:Mover) if:(= (value Piece of:(what at:(site))) 4))
Will give you all the sites occupied by the mover with a piece value of 4.
If you have a stack, that's more complex and you can not return a specific site (because you have many pieces on it). So just depend what you want to do with it.
For the pending, that's exactly that. But yes I have to add a short explanation in the LGLG, that will be done.
I really advice you to ask one question in each forum message for us to be able to answer to it more easily.
Regards,
Eric