Remove unused millList because rule canRepeated is not supported
This commit is contained in:
parent
2d1ed84be4
commit
0505423bde
|
@ -1356,23 +1356,6 @@ void Position::mirror(vector <string> &moveHistory, bool cmdChange /*= true*/)
|
|||
currentSquare = static_cast<Square>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
|
||||
for (auto &mill : millList) {
|
||||
llp[0] = (mill & 0x000000ff00000000) >> 32;
|
||||
llp[1] = (mill & 0x0000000000ff0000) >> 16;
|
||||
llp[2] = (mill & 0x00000000000000ff);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
f = static_cast<int>(llp[i]) / RANK_NB;
|
||||
r = static_cast<int>(llp[i]) % RANK_NB;
|
||||
r = (RANK_NB - r) % RANK_NB;
|
||||
llp[i] = static_cast<uint64_t>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
mill &= 0xffffff00ff00ff00;
|
||||
mill |= (llp[0] << 32) | (llp[1] << 16) | llp[2];
|
||||
}
|
||||
|
||||
if (cmdChange) {
|
||||
unsigned r1, s1, r2, s2;
|
||||
int args = 0;
|
||||
|
@ -1478,28 +1461,6 @@ void Position::turn(vector <string> &moveHistory, bool cmdChange /*= true*/)
|
|||
currentSquare = static_cast<Square>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
for (auto &mill : millList) {
|
||||
llp[0] = (mill & 0x000000ff00000000) >> 32;
|
||||
llp[1] = (mill & 0x0000000000ff0000) >> 16;
|
||||
llp[2] = (mill & 0x00000000000000ff);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
f = static_cast<int>(llp[i]) / RANK_NB;
|
||||
r = static_cast<int>(llp[i]) % RANK_NB;
|
||||
|
||||
if (f == 1)
|
||||
f = FILE_NB;
|
||||
else if (f == FILE_NB)
|
||||
f = 1;
|
||||
|
||||
llp[i] = static_cast<uint64_t>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
mill &= 0xffffff00ff00ff00;
|
||||
mill |= (llp[0] << 32) | (llp[1] << 16) | llp[2];
|
||||
}
|
||||
|
||||
// 命令行解析
|
||||
if (cmdChange) {
|
||||
unsigned r1, s1, r2, s2;
|
||||
int args = 0;
|
||||
|
@ -1597,7 +1558,6 @@ void Position::rotate(vector <string> &moveHistory, int degrees, bool cmdChange
|
|||
|
||||
Piece ch1, ch2;
|
||||
int f, r;
|
||||
int i;
|
||||
|
||||
if (degrees == 2) {
|
||||
for (f = 1; f <= FILE_NB; f++) {
|
||||
|
@ -1665,22 +1625,6 @@ void Position::rotate(vector <string> &moveHistory, int degrees, bool cmdChange
|
|||
currentSquare = static_cast<Square>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
for (auto &mill : millList) {
|
||||
llp[0] = (mill & 0x000000ff00000000) >> 32;
|
||||
llp[1] = (mill & 0x0000000000ff0000) >> 16;
|
||||
llp[2] = (mill & 0x00000000000000ff);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
f = static_cast<int>(llp[i]) / RANK_NB;
|
||||
r = static_cast<int>(llp[i]) % RANK_NB;
|
||||
r = (r + RANK_NB - degrees) % RANK_NB;
|
||||
llp[i] = static_cast<uint64_t>(f * RANK_NB + r);
|
||||
}
|
||||
|
||||
mill &= 0xffffff00ff00ff00;
|
||||
mill |= (llp[0] << 32) | (llp[1] << 16) | llp[2];
|
||||
}
|
||||
|
||||
if (cmdChange) {
|
||||
unsigned r1, s1, r2, s2;
|
||||
int args = 0;
|
||||
|
|
|
@ -191,32 +191,6 @@ public:
|
|||
|
||||
char record[64] { '\0' };
|
||||
|
||||
/*
|
||||
0x 00 00 00 00 00 00 00 00
|
||||
unused unused piece1 square1 piece2 square2 piece3 square3
|
||||
*/
|
||||
|
||||
uint64_t millList[4];
|
||||
|
||||
/*
|
||||
0x 00 00
|
||||
square1 square2
|
||||
Placing:0x00??,?? is place location
|
||||
Moving:0x__??,__ is from,?? is to
|
||||
Removing:0xFF??,?? is neg
|
||||
|
||||
31 ----- 24 ----- 25
|
||||
| \ | / |
|
||||
| 23 -- 16 -- 17 |
|
||||
| | \ | / | |
|
||||
| | 15 08 09 | |
|
||||
30-22-14 10-18-26
|
||||
| | 13 12 11 | |
|
||||
| | / | \ | |
|
||||
| 21 -- 20 -- 19 |
|
||||
| / | \ |
|
||||
29 ----- 28 ----- 27
|
||||
*/
|
||||
Move move { MOVE_NONE };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue