refactor: Rename addMill to millsCount
This commit is contained in:
parent
3f85a41652
commit
f7f72222c7
|
@ -808,7 +808,7 @@ bool Position::put_piece(Square s, bool updateCmdlist)
|
|||
|
||||
currentSquare = s;
|
||||
|
||||
int n = add_mills(currentSquare);
|
||||
int n = mills_count(currentSquare);
|
||||
|
||||
if (n == 0) {
|
||||
assert(pieceInHandCount[BLACK] >= 0 && pieceInHandCount[WHITE] >= 0);
|
||||
|
@ -879,7 +879,7 @@ bool Position::put_piece(Square s, bool updateCmdlist)
|
|||
SET_BIT(byColorBB[color_of(pc)], s);
|
||||
|
||||
currentSquare = s;
|
||||
int n = add_mills(currentSquare);
|
||||
int n = mills_count(currentSquare);
|
||||
|
||||
// midgame
|
||||
if (n == 0) {
|
||||
|
@ -1450,7 +1450,7 @@ int Position::potential_mills_count(Square to, Color c, Square from)
|
|||
return n;
|
||||
}
|
||||
|
||||
int Position::add_mills(Square s)
|
||||
int Position::mills_count(Square s)
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ public:
|
|||
void reset_bb();
|
||||
|
||||
void create_mill_table();
|
||||
int add_mills(Square s);
|
||||
int mills_count(Square s);
|
||||
|
||||
// The number of mills that would be closed by the given move.
|
||||
int potential_mills_count(Square to, Color c, Square from = SQ_0);
|
||||
|
|
|
@ -523,7 +523,7 @@ class Position {
|
|||
|
||||
currentSquare = s;
|
||||
|
||||
int n = addMills(currentSquare);
|
||||
int n = millsCount(currentSquare);
|
||||
|
||||
if (n == 0) {
|
||||
assert(pieceInHandCount[Color.black] >= 0 &&
|
||||
|
@ -594,7 +594,7 @@ class Position {
|
|||
_grid[squareToIndex[currentSquare]] = Piece.noPiece;
|
||||
|
||||
currentSquare = s;
|
||||
int n = addMills(currentSquare);
|
||||
int n = millsCount(currentSquare);
|
||||
|
||||
// midgame
|
||||
if (n == 0) {
|
||||
|
@ -1351,7 +1351,7 @@ class Position {
|
|||
return n;
|
||||
}
|
||||
|
||||
int addMills(int s) {
|
||||
int millsCount(int s) {
|
||||
int n = 0;
|
||||
List<int> idx = [0, 0, 0];
|
||||
int min;
|
||||
|
|
Loading…
Reference in New Issue