78 #define foreach_move(iter, movelist) \ 79 for ((iter) = (movelist)->move->next; (iter); (iter) = (iter)->next) 82 #define foreach_best_move(iter, movelist) \ 83 for ((iter) = movelist_best(movelist); (iter); (iter) = move_next_best(iter))
Move move[MAX_MOVE+2]
Definition: move.h:30
Move * movelist_best(MoveList *)
Return the best move of the list.
Definition: move.c:411
void line_print(const Line *, int, const char *, FILE *)
Print a move sequence.
Definition: move.c:610
int size
Definition: move.h:95
void line_init(Line *, const int)
Initialize a sequence of moves.
Definition: move.c:549
const Move MOVE_PASS
Definition: move.c:26
Move * move_next(Move *)
Return the next move from the list.
Definition: move.c:400
char * line_to_string(const Line *line, int n, const char *, char *string)
Line to string.
Definition: move.c:635
void movehash_delete(MoveHash *)
Free the hash table.
Definition: move.c:730
Move * move_next_best(Move *)
Return the next best move from the list.
Definition: move.c:346
int color
Definition: move.h:38
void move_print(const int, const int, FILE *)
Print out a move.
Definition: move.c:110
const Move MOVE_INIT
Definition: move.c:25
int symetry(int, const int)
Get a symetric square coordinate.
Definition: move.c:47
int mask
Definition: move.h:96
void movelist_restore(MoveList *, Move *)
unsigned int cost
Definition: move.h:24
struct MoveArray * array
Definition: move.h:94
void line_copy(Line *, const Line *, const int)
Copy part of a sequence to another sequence.
Definition: move.c:591
void movelist_sort_cost(MoveList *, const struct HashData *)
void movelist_evaluate_fast(MoveList *, struct Search *)
unsigned long long flipped
Definition: move.h:21
void movehash_init(MoveHash *, int)
Initialisation of the hash table.
Definition: move.c:715
int x
Definition: move.h:22
int movelist_get_moves(MoveList *, const struct Board *)
char * move_to_string(const int, const int, char *)
Print out a move.
Definition: move.c:76
void movelist_print(const MoveList *, const int, FILE *)
Print out a movelist.
Definition: move.c:330
void movelist_sort(MoveList *)
Sort all moves.
Definition: move.c:505
bool movelist_is_empty(const MoveList *)
Check if the list is empty.
Definition: move.c:537
int n_moves
Definition: move.h:31
Move * movelist_exclude(MoveList *, const int)
Exclude a move.
Definition: move.c:516
bool movehash_append(MoveHash *, const struct Board *, const int)
bool movelist_is_single(const MoveList *)
void tune_move_evaluate(struct Search *, const char *, const char *)
Move * movelist_first(MoveList *)
Return the first move of the list.
Definition: move.c:422
#define GAME_SIZE
Definition: const.h:25
int n_moves
Definition: move.h:37
struct Move * next
Definition: move.h:25
void movelist_evaluate(MoveList *, struct Search *, const struct HashData *, const int, const int)
#define MAX_MOVE
Definition: const.h:18
bool move_wipeout(const Move *, const struct Board *)
void line_push(Line *, const int)
Add a move to the sequence.
Definition: move.c:561
char move[GAME_SIZE]
Definition: move.h:36
Move * movelist_sort_bestmove(MoveList *, const int)
Sort a move as best.
Definition: move.c:468
void line_pop(Line *)
Remove the last move from a sequence.
Definition: move.c:578
int score
Definition: move.h:23