-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpieces.coffee
34 lines (32 loc) · 1.06 KB
/
pieces.coffee
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
# https://tetris.fandom.com/wiki/SRS
pieces =
I:
polygon: [[4,1], [4,0], [0,0], [0,1]]
edges: [[[1,0], [1,1]], [[2,0], [2,1]], [[3,0], [3,1]]]
center: [2,1]
J:
polygon: [[0,0], [1,0], [1,1], [3,1], [3,2], [0,2]]
edges: [[[0,1], [1,1]], [[1,1], [1,2]], [[2,1], [2,2]]]
center: [1.5,1.5]
L:
polygon: [[0,1], [2,1], [2,0], [3,0], [3,2], [0,2]]
edges: [[[1,1], [1,2]], [[2,1], [2,2]], [[2,1], [3,1]]]
center: [1.5,1.5]
O:
polygon: [[0,0], [2,0], [2,2], [0,2]]
edges: [[[1,0], [1,2]], [[0,1], [2,1]]]
center: [1,1]
S:
polygon: [[1,0], [3,0], [3,1], [2,1], [2,2], [0,2], [0,1], [1,1]]
edges: [[[2,0], [2,1]], [[2,1], [1,1]], [[1,1], [1,2]]]
center: [1.5,1.5]
T:
polygon: [[1,0], [2,0], [2,1], [3,1], [3,2], [0,2], [0,1], [1,1]]
edges: [[[1,2], [1,1]], [[1,1], [2,1]], [[2,1], [2,2]]]
center: [1.5,1.5]
Z:
polygon: [[0,0], [2,0], [2,1], [3,1], [3,2], [1,2], [1,1], [0,1]]
edges: [[[1,0], [1,1]], [[2,1], [1,1]], [[2,1], [2,2]]]
center: [1.5,1.5]
module?.exports = pieces
window?.pieces = pieces