07-02-2020, 09:26 PM
I've attached a file called "Hexagonal Chess.lud" that I've written. I'd be happy for it to be added to the Ludii system. It supports several variants of Hexagonal Chess: Glinski, Brusky, De Vasa, McCooey, Mini Hexchess, Shafran, and Starchess. (I also added a variant called Empty Palace that I initially wrote to facilitate testing castling, then decided to keep in.)
To play a particular variant, the end-user selects a given ruleset. The rulesets are implemented using options. This seemed like the best way to support multiple variants. Though the system currently displays all the options in the app menu, not all combinations of Options are compatible. For example, one option could removes certain board spaces, while another might place pieces on those spaces. If there were a way to hide options from the options menu, then hiding these options could prevent some possible end-user confusion.
I've added underscores to some of my function/ludeme names, contrary to Ludii precedent. I've done this do call out that a function is one of a collection of related functions. For example, Castle_PreCheck, Castle_Base, and Castle_KingRook all belong to a "family" of Castle functions. The underscores aren't necessary, but they seemed to make the code easier to read.
There is one known bug, as noted in the code: following the 3-space initial Pawn move in Shafran chess, there is no en passant move available (see PawnStep_Multi). This is likely because I don't fully understand how Pending and Var work in Ludii.
I'm considering adding other variants, such as the 3-player Wellisch Chess.
I'd be happy to modify the copyright statement to an agreed-upon copyright, such as the MIT license.
Lastly, thanks for creating Ludii. It's a great system!
To play a particular variant, the end-user selects a given ruleset. The rulesets are implemented using options. This seemed like the best way to support multiple variants. Though the system currently displays all the options in the app menu, not all combinations of Options are compatible. For example, one option could removes certain board spaces, while another might place pieces on those spaces. If there were a way to hide options from the options menu, then hiding these options could prevent some possible end-user confusion.
I've added underscores to some of my function/ludeme names, contrary to Ludii precedent. I've done this do call out that a function is one of a collection of related functions. For example, Castle_PreCheck, Castle_Base, and Castle_KingRook all belong to a "family" of Castle functions. The underscores aren't necessary, but they seemed to make the code easier to read.
There is one known bug, as noted in the code: following the 3-space initial Pawn move in Shafran chess, there is no en passant move available (see PawnStep_Multi). This is likely because I don't fully understand how Pending and Var work in Ludii.
I'm considering adding other variants, such as the 3-player Wellisch Chess.
I'd be happy to modify the copyright statement to an agreed-upon copyright, such as the MIT license.
Lastly, thanks for creating Ludii. It's a great system!