-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathAttributes.h
44 lines (37 loc) · 1.12 KB
/
Attributes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef ATTRIBUTES_H_INCLUDED
#define ATTRIBUTES_H_INCLUDED
#include "config.h"
#include <vector>
#include <string>
#include <bitset>
#include "KoState.h"
class BaseAttributes {
public:
static int border_distance(std::pair<int, int> xy, int bsize);
static int move_distance(std::pair<int, int> xy1, std::pair<int, int> xy2);
};
// Move attributes for full move ordering
class Attributes : public BaseAttributes {
public:
void get_from_move(FastState * state,
std::vector<int> & territory,
std::vector<int> & moyo,
int move);
uint64 get_pattern(void);
bool attribute_enabled(int idx);
private:
int m_pattern;
std::bitset<110> m_present;
};
// Move attributes for quick move ordering
class FastAttributes : public BaseAttributes {
public:
void get_from_move(FastState * state,
int move);
uint64 get_pattern(void);
bool attribute_enabled(int idx);
private:
int m_pattern;
std::bitset<10> m_present;
};
#endif