My Project
|
Macros | |
#define | LODWORD(l) ((unsigned int)(l)) |
#define | HIDWORD(l) ((unsigned int)((l)>>32)) |
Functions | |
static int | count_last_flip_A1 (const unsigned long long P) |
static int | count_last_flip_B1 (const unsigned long long P) |
static int | count_last_flip_C1 (const unsigned long long P) |
static int | count_last_flip_D1 (const unsigned long long P) |
static int | count_last_flip_E1 (const unsigned long long P) |
static int | count_last_flip_F1 (const unsigned long long P) |
static int | count_last_flip_G1 (const unsigned long long P) |
static int | count_last_flip_H1 (const unsigned long long P) |
static int | count_last_flip_A2 (const unsigned long long P) |
static int | count_last_flip_B2 (const unsigned long long P) |
static int | count_last_flip_C2 (const unsigned long long P) |
static int | count_last_flip_D2 (const unsigned long long P) |
static int | count_last_flip_E2 (const unsigned long long P) |
static int | count_last_flip_F2 (const unsigned long long P) |
static int | count_last_flip_G2 (const unsigned long long P) |
static int | count_last_flip_H2 (const unsigned long long P) |
static int | count_last_flip_A3 (const unsigned long long P) |
static int | count_last_flip_B3 (const unsigned long long P) |
static int | count_last_flip_C3 (const unsigned long long P) |
static int | count_last_flip_D3 (const unsigned long long P) |
static int | count_last_flip_E3 (const unsigned long long P) |
static int | count_last_flip_F3 (const unsigned long long P) |
static int | count_last_flip_G3 (const unsigned long long P) |
static int | count_last_flip_H3 (const unsigned long long P) |
static int | count_last_flip_A4 (const unsigned long long P) |
static int | count_last_flip_B4 (const unsigned long long P) |
static int | count_last_flip_C4 (const unsigned long long P) |
static int | count_last_flip_D4 (const unsigned long long P) |
static int | count_last_flip_E4 (const unsigned long long P) |
static int | count_last_flip_F4 (const unsigned long long P) |
static int | count_last_flip_G4 (const unsigned long long P) |
static int | count_last_flip_H4 (const unsigned long long P) |
static int | count_last_flip_A5 (const unsigned long long P) |
static int | count_last_flip_B5 (const unsigned long long P) |
static int | count_last_flip_C5 (const unsigned long long P) |
static int | count_last_flip_D5 (const unsigned long long P) |
static int | count_last_flip_E5 (const unsigned long long P) |
static int | count_last_flip_F5 (const unsigned long long P) |
static int | count_last_flip_G5 (const unsigned long long P) |
static int | count_last_flip_H5 (const unsigned long long P) |
static int | count_last_flip_A6 (const unsigned long long P) |
static int | count_last_flip_B6 (const unsigned long long P) |
static int | count_last_flip_C6 (const unsigned long long P) |
static int | count_last_flip_D6 (const unsigned long long P) |
static int | count_last_flip_E6 (const unsigned long long P) |
static int | count_last_flip_F6 (const unsigned long long P) |
static int | count_last_flip_G6 (const unsigned long long P) |
static int | count_last_flip_H6 (const unsigned long long P) |
static int | count_last_flip_A7 (const unsigned long long P) |
static int | count_last_flip_B7 (const unsigned long long P) |
static int | count_last_flip_C7 (const unsigned long long P) |
static int | count_last_flip_D7 (const unsigned long long P) |
static int | count_last_flip_E7 (const unsigned long long P) |
static int | count_last_flip_F7 (const unsigned long long P) |
static int | count_last_flip_G7 (const unsigned long long P) |
static int | count_last_flip_H7 (const unsigned long long P) |
static int | count_last_flip_A8 (const unsigned long long P) |
static int | count_last_flip_B8 (const unsigned long long P) |
static int | count_last_flip_C8 (const unsigned long long P) |
static int | count_last_flip_D8 (const unsigned long long P) |
static int | count_last_flip_E8 (const unsigned long long P) |
static int | count_last_flip_F8 (const unsigned long long P) |
static int | count_last_flip_G8 (const unsigned long long P) |
static int | count_last_flip_H8 (const unsigned long long P) |
static int | count_last_flip_pass (const unsigned long long P) |
int | count_last_flip (const int x, const unsigned long long P) |
Variables | |
static const char | COUNT_FLIP_R [128] |
static const char | COUNT_FLIP_2 [256] |
static const char | COUNT_FLIP_3 [256] |
static const char | COUNT_FLIP_4 [256] |
static const char | COUNT_FLIP_5 [256] |
static const char | COUNT_FLIP_L [128] |
int(* | COUNT_LAST_FLIP [])(const unsigned long long) |
A function is provided to count the number of fipped disc of the last move for each square of the board. These functions are gathered into an array of functions, so that a fast access to each function is allowed. The generic form of the function take as input the player bitboard and return twice the number of flipped disc of the last move.
The basic principle is to read into an array a precomputed result. Doing this is easy for a single line ; as we can use arrays of the form:
With 135 degree merge, instead of Valery ClaudePierre's modification.
#define HIDWORD | ( | l | ) | ((unsigned int)((l)>>32)) |
#define LODWORD | ( | l | ) | ((unsigned int)(l)) |
int count_last_flip | ( | const int | x, |
const unsigned long long | P | ||
) |
|
static |
Count last flipped discs when playing on square A1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square A8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square B8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square C8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square D8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square E8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square F8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square G8.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H1.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H2.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H3.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H4.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H5.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H6.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H7.
P | player's disc pattern. |
|
static |
Count last flipped discs when playing on square H8.
P | player's disc pattern. |
|
static |
Count last flipped discs when plassing.
P | player's disc pattern (unused). |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
precomputed count flip array
int(* COUNT_LAST_FLIP[])(const unsigned long long) | ( | const unsigned long long | ) |
Array of functions to count flipped discs of the last move