From: Fabian Fichter Date: Fri, 10 Jan 2020 19:15:25 +0000 (+0100) Subject: Rename firstRankDrops to firstRankPawnDrops X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=bcf637079fcc198708da9111d6ab5aa347e69559;p=fairystockfish.git Rename firstRankDrops to firstRankPawnDrops No functional change. --- diff --git a/src/parser.cpp b/src/parser.cpp index 55b9afb..8ed6074 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -179,7 +179,7 @@ Variant* VariantParser::parse(Variant* v) { parse_attribute("pieceDrops", v->pieceDrops); parse_attribute("dropLoop", v->dropLoop); parse_attribute("capturesToHand", v->capturesToHand); - parse_attribute("firstRankDrops", v->firstRankDrops); + parse_attribute("firstRankPawnDrops", v->firstRankPawnDrops); parse_attribute("dropOnTop", v->dropOnTop); parse_attribute("whiteDropRegion", v->whiteDropRegion); parse_attribute("blackDropRegion", v->blackDropRegion); diff --git a/src/position.h b/src/position.h index 548b609..67c2586 100644 --- a/src/position.h +++ b/src/position.h @@ -128,7 +128,7 @@ public: bool piece_drops() const; bool drop_loop() const; bool captures_to_hand() const; - bool first_rank_drops() const; + bool first_rank_pawn_drops() const; bool drop_on_top() const; Bitboard drop_region(Color c) const; Bitboard drop_region(Color c, PieceType pt) const; @@ -484,9 +484,9 @@ inline bool Position::captures_to_hand() const { return var->capturesToHand; } -inline bool Position::first_rank_drops() const { +inline bool Position::first_rank_pawn_drops() const { assert(var != nullptr); - return var->firstRankDrops; + return var->firstRankPawnDrops; } inline bool Position::drop_on_top() const { @@ -509,7 +509,7 @@ inline Bitboard Position::drop_region(Color c, PieceType pt) const { if (pt == PAWN) { b &= ~promotion_zone_bb(c, promotion_rank(), max_rank()); - if (!first_rank_drops()) + if (!first_rank_pawn_drops()) b &= ~rank_bb(relative_rank(c, RANK_1, max_rank())); } // Doubled shogi pawns diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 53d684d..c01c30f 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -81,7 +81,7 @@ void on_variant_change(const Option &o) { : ""; if (v->pieceDrops) { - if (pt == PAWN && !v->firstRankDrops) + if (pt == PAWN && !v->firstRankPawnDrops) suffix += "j"; else if (pt == SHOGI_PAWN && !v->shogiDoubledPawn) suffix += "f"; diff --git a/src/variant.cpp b/src/variant.cpp index 5858169..960ee4e 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -270,7 +270,7 @@ namespace { } Variant* chessgi_variant() { Variant* v = loop_variant(); - v->firstRankDrops = true; + v->firstRankPawnDrops = true; return v; } Variant* bughouse_variant() { diff --git a/src/variant.h b/src/variant.h index 9461ea2..5e599d9 100644 --- a/src/variant.h +++ b/src/variant.h @@ -72,7 +72,7 @@ struct Variant { bool pieceDrops = false; bool dropLoop = false; bool capturesToHand = false; - bool firstRankDrops = false; + bool firstRankPawnDrops = false; bool dropOnTop = false; Bitboard whiteDropRegion = AllSquares; Bitboard blackDropRegion = AllSquares; diff --git a/src/variants.ini b/src/variants.ini index 0f4bf3b..c2cd752 100644 --- a/src/variants.ini +++ b/src/variants.ini @@ -127,7 +127,7 @@ # pieceDrops: enable piece drops [bool] (default: false) # dropLoop: captures promoted pieces are not demoted [bool] (default: false) # capturesToHand: captured pieces are go to opponent's hand [bool] (default: false) -# firstRankDrops: allow pawn drops to first rank [bool] (default: false) +# firstRankPawnDrops: allow pawn drops to first rank [bool] (default: false) # dropOnTop: piece drops need to be on top of pieces on board (e.g., for connect4) [bool] (default: false) # whiteDropRegion: restrict region for piece drops of all white pieces [Bitboard] # blackDropRegion: restrict region for piece drops of all black pieces [Bitboard]