-
Notifications
You must be signed in to change notification settings - Fork 1
/
tetris.ts
60 lines (51 loc) · 1.53 KB
/
tetris.ts
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
import "regenerator-runtime/runtime";
import { default as jstAcq } from "./src/acq";
import { default as jstCrd } from "./src/crd";
import { default as jstGrid } from "./src/grid-gameOver";
import { default as jstHold } from "./src/hold";
import { default as jstJst } from "./src/jst";
import { default as jstLinedeletion } from "./src/linedeletion";
import { default as jstPreview } from "./src/preview";
import { default as jstShadow } from "./src/shadow";
import { default as jstTime } from "./src/time";
import { default as jstTris } from "./src/tris";
import { default as jstTrisBank } from "./src/trisBank";
import { default as jstUact } from "./src/uact";
import { default as jstUtil } from "./src/util";
import { default as jstZone } from "./src/zone";
import { githubCornerHTML } from "./src/lib/githubCorner";
let jstModuleArray = [
jstUtil,
jstJst,
jstTime,
jstZone,
jstGrid,
jstTrisBank,
jstTris,
jstCrd,
jstAcq,
jstUact,
jstLinedeletion,
jstHold,
jstPreview,
jstShadow,
];
var jst: Jst = {} as any;
for (let modu of jstModuleArray) {
modu.call(jst, jst);
if (modu == jstUtil) {
window.Hook = jst.util.Hook;
window.range = jst.util.range;
}
if (modu == jstTime) {
window.time = jst.time;
}
}
window.j = jst;
jst.init.run();
jst.start.run();
let corner = document.createElement("div");
let REPO_URL = "https://github.com/mathieucaroff/tetris";
corner.innerHTML = githubCornerHTML(REPO_URL);
document.body.append(corner);
console.log(REPO_URL);