From 2073dfd89dce84378c24e91c51cae3989c928ee5 Mon Sep 17 00:00:00 2001 From: RainRat Date: Wed, 12 Apr 2023 09:45:17 -0700 Subject: [PATCH] add mini games (#640) 1D Chess, Tuktuk, Aralzaa, Bajr, Lewthwaite's Game, Hexapawn --- src/parser.cpp | 1 + src/variants.ini | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 0 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index dbde7ed..9907a5b 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -449,6 +449,7 @@ Variant* VariantParser::parse(Variant* v) { parse_attribute("flagPiece", v->flagPiece, v->pieceToChar); parse_attribute("flagRegionWhite", v->flagRegion[WHITE]); parse_attribute("flagRegionBlack", v->flagRegion[BLACK]); + parse_attribute("flagPieceCount", v->flagPieceCount); parse_attribute("flagMove", v->flagMove); parse_attribute("checkCounting", v->checkCounting); parse_attribute("connectN", v->connectN); diff --git a/src/variants.ini b/src/variants.ini index da69e38..3a23a46 100644 --- a/src/variants.ini +++ b/src/variants.ini @@ -1290,3 +1290,76 @@ pieceToCharTable = P...Q..AH..ECTDY....LKp...q..ah..ectdy....lk [atomicduck:atomic] duckGating = true stalemateValue = win + +#https://en.wikipedia.org/wiki/Hexapawn +#black wins +[hexapawn] +maxRank = 3 +maxFile = c +startFen = ppp/3/PPP w +flagPiece = p +flagRegionWhite = *3 +flagRegionBlack = *1 +customPiece1 = p:mfWcfF +stalemateValue = loss + +#https://ludii.games/details.php?keyword=1D%20Chess +#white wins +[1d-chess:chess] +maxRank = 1 +maxFile = h +customPiece1 = n:D +startFen = KNR2rnk w + +#https://ludii.games/details.php?keyword=T%27uk%20T%27uk +#The implementation on Ludii doesn't match the description. Ludii implements a Wazir, while the translated description is of a forwards and backwards (non-capturing) Rook. +#black wins +[tuktuk] +maxRank = 6 +maxFile = f +customPiece1 = w:mfbR +startFen = wwwwww/6/6/6/6/WWWWWW w +stalemateValue = loss +nFoldRule=0 +nMoveRule=0 + +#https://ludii.games/details.php?keyword=Aralzaa +#possibly missing rules +#draw +[aralzaa] +maxRank = 3 +maxFile = c +customPiece1 = n:mN +startFen = nnn/3/NNN w +flagPiece = n +flagRegionWhite = *3 +flagRegionBlack = *1 +flagPieceCount = 3 +nFoldRule=0 +nMoveRule=0 + +#https://ludii.games/variantDetails.php?keyword=Bajr&variant=1036 +#Some ludii players speculate that it might be missing rules: +#https://ludii.games/forums/showthread.php?tid=762&highlight=bajr +#https://ludii.games/forums/showthread.php?tid=364&highlight=bajr +#but after looking at the translated description, the answer is, the pieces can't move backwards (they have the 3 moves that advance toward the goal). +#white wins +[bajr] +maxRank = 6 +maxFile = f +customPiece1 = p:mfrWmrfF +startFen = 4pp/5p/6/6/P5/PP4 w +flagPiece = p +flagRegionWhite = e6 f6 f5 +flagRegionBlack = a1 a2 b1 +flagPieceCount = 3 +nMoveRule=0 + +#https://ludii.games/details.php?keyword=Lewthwaite%27s%20Game +#black wins +[lewthwaite] +maxRank = 5 +maxFile = e +customPiece1 = w:mW +startFen = wWwWw/WwWwW/wW1Ww/WwWwW/wWwWw w +stalemateValue = loss -- 1.7.0.4