-
Notifications
You must be signed in to change notification settings - Fork 0
/
piece.h
122 lines (99 loc) · 2.9 KB
/
piece.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* piece.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kmira <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/07 22:54:34 by kmira #+# #+# */
/* Updated: 2019/05/16 12:58:26 by kmira ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PIECE_H
# define PIECE_H
/*
** mask[0],
** mask[1],
** mask[2],
** mask[3], type, width, height
*/
const unsigned short g_piece_classifier[20][7] =
{
{ 0b1000000000000000,
0b1000000000000000,
0b1000000000000000,
0b1000000000000000, 1, 4, 1},
{ 0b1111000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000, 2, 1, 4},
{ 0b1000000000000000,
0b1000000000000000,
0b1100000000000000,
0b0000000000000000, 3, 3, 2},
{ 0b0100000000000000,
0b0100000000000000,
0b1100000000000000,
0b0000000000000000, 4, 3, 2},
{ 0b1100000000000000,
0b1000000000000000,
0b1000000000000000,
0b0000000000000000, 5, 3, 2},
{ 0b1100000000000000,
0b0100000000000000,
0b0100000000000000,
0b0000000000000000, 6, 3, 2},
{ 0b1110000000000000,
0b1000000000000000,
0b0000000000000000,
0b0000000000000000, 7, 2, 3},
{ 0b1110000000000000,
0b0010000000000000,
0b0000000000000000,
0b0000000000000000, 8, 2, 3},
{ 0b1000000000000000,
0b1110000000000000,
0b0000000000000000,
0b0000000000000000, 9, 2, 3},
{ 0b0010000000000000,
0b1110000000000000,
0b0000000000000000,
0b0000000000000000, 10, 2, 3},
{ 0b1000000000000000,
0b1100000000000000,
0b0100000000000000,
0b0000000000000000, 11, 3, 2},
{ 0b0100000000000000,
0b1100000000000000,
0b1000000000000000,
0b0000000000000000, 12, 3, 2},
{ 0b1100000000000000,
0b0110000000000000,
0b0000000000000000,
0b0000000000000000, 13, 2, 3},
{ 0b0110000000000000,
0b1100000000000000,
0b0000000000000000,
0b0000000000000000, 14, 2, 3},
{ 0b1000000000000000,
0b1100000000000000,
0b1000000000000000,
0b0000000000000000, 15, 3, 2},
{ 0b1100000000000000,
0b1100000000000000,
0b0000000000000000,
0b0000000000000000, 16, 2, 2},
{ 0b0100000000000000,
0b1100000000000000,
0b0100000000000000,
0b0000000000000000, 17, 3, 2},
{ 0b1110000000000000,
0b0100000000000000,
0b0000000000000000,
0b0000000000000000, 18, 2, 3},
{ 0b0100000000000000,
0b1110000000000000,
0b0000000000000000,
0b0000000000000000, 19, 2, 3},
};
#endif