未使用 locationToPlayer() 的地方进行使用

This commit is contained in:
Calcitem 2020-05-10 20:16:44 +08:00
parent 06f1e3000e
commit 4057808fa5
1 changed files with 3 additions and 4 deletions

View File

@ -393,15 +393,14 @@ bool Board::isAllSurrounded(int sideId, int nPiecesOnBoard[], player_t player)
// 查询整个棋盘
square_t moveSquare;
int locend = N_SEATS * (N_RINGS + 1);
for (int i = 1; i < locend; i++) {
if (!(0x30 & player & locations[i])) {
for (square_t sq = SQ_BEGIN; sq < SQ_END; sq = (square_t)(sq + 1)) {
if (!(player & locationToPlayer(sq))) {
continue;
}
for (direction_t d = DIRECTION_BEGIN; d < DIRECTIONS_COUNT; d = (direction_t)(d + 1)) {
moveSquare = static_cast<square_t>(MoveList::moveTable[i][d]);
moveSquare = static_cast<square_t>(MoveList::moveTable[sq][d]);
if (moveSquare && !locations[moveSquare]) {
return false;
}