symetryMove function
Get symetry move list.
See: https://github.com/abulmo/edax-reversi/blob/1ae7c9fe5322ac01975f1b3196e788b0d25c1e10/src/book.c#L542-L550 See: https://github.com/abulmo/edax-reversi/blob/1ae7c9fe5322ac01975f1b3196e788b0d25c1e10/src/move.c#L40-L63
Implementation
int symetryMove(final int x, final int symetry) {
var x_ = x; // ignore: non_constant_identifier_names
if (symetry & 1 != 0) {
x_ = (x_ & _octal070) | (7 - (x_ & 7));
}
if (symetry & 2 != 0) {
x_ = (_octal070 - (x_ & _octal070)) | (x_ & 7);
}
if (symetry & 4 != 0) {
x_ = ((x_ & _octal070) >> 3) | ((x_ & 7) << 3);
}
return x_;
}