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