blob: 847d11548905b8100bd708b793b5fa605728d6a3 (
plain)
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
|
initial memory usage: 5704 bytes
after int type changes: 5180 bytes
after basic bitmask: 3580 bytes
change color into u8: 1944 bytes
move color into bitmask: 1908 bytes
remove lock_tick from slot: 788 bytes
change some enums and make piece_matrix samller: 606 bytes
optimize piece_queue: 530 bytes
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
00000000
00000111
INIT = 0
ONCE_RIGHT = 1
TWICE = 2
ONCE_LEFT = 3
clockwise:
- 0 -> 1, 0
- 1 -> 2, 2
- 2 -> 3, 4
- 3 -> 0, 6
counter clockwise:
- 1 -> 0, 1
- 2 -> 1, 3
- 3 -> 2, 5
- 0 -> 3, 7
|