sq 自增由 i=i+1 改为 ++i
This commit is contained in:
parent
d8270658b0
commit
0663f3e9e9
|
@ -1153,7 +1153,7 @@ int Position::get_mobility_diff(bool includeFobidden)
|
||||||
int diff = 0;
|
int diff = 0;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
for (Square i = SQ_BEGIN; i < SQ_END; i = static_cast<Square>(i + 1)) {
|
for (Square i = SQ_BEGIN; i < SQ_END; ++i) {
|
||||||
n = surrounded_empty_squares_count(i, includeFobidden);
|
n = surrounded_empty_squares_count(i, includeFobidden);
|
||||||
|
|
||||||
if (board[i] & B_STONE) {
|
if (board[i] & B_STONE) {
|
||||||
|
@ -1488,7 +1488,7 @@ int Position::add_mills(Square s)
|
||||||
|
|
||||||
bool Position::is_all_in_mills(Color c)
|
bool Position::is_all_in_mills(Color c)
|
||||||
{
|
{
|
||||||
for (Square i = SQ_BEGIN; i < SQ_END; i = static_cast<Square>(i + 1)) {
|
for (Square i = SQ_BEGIN; i < SQ_END; ++i) {
|
||||||
if (board[i] & ((uint8_t)make_piece(c))) {
|
if (board[i] & ((uint8_t)make_piece(c))) {
|
||||||
if (!in_how_many_mills(i, NOBODY)) {
|
if (!in_how_many_mills(i, NOBODY)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -294,7 +294,7 @@ enum : int
|
||||||
DEPTH_OFFSET = DEPTH_NONE
|
DEPTH_OFFSET = DEPTH_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Square : int32_t
|
enum Square : int
|
||||||
{
|
{
|
||||||
SQ_0 = 0, SQ_1 = 1, SQ_2 = 2, SQ_3 = 3, SQ_4 = 4, SQ_5 = 5, SQ_6 = 6, SQ_7 = 7,
|
SQ_0 = 0, SQ_1 = 1, SQ_2 = 2, SQ_3 = 3, SQ_4 = 4, SQ_5 = 5, SQ_6 = 6, SQ_7 = 7,
|
||||||
SQ_8 = 8, SQ_9 = 9, SQ_10 = 10, SQ_11 = 11, SQ_12 = 12, SQ_13 = 13, SQ_14 = 14, SQ_15 = 15,
|
SQ_8 = 8, SQ_9 = 9, SQ_10 = 10, SQ_11 = 11, SQ_12 = 12, SQ_13 = 13, SQ_14 = 14, SQ_15 = 15,
|
||||||
|
|
Loading…
Reference in New Issue