Starting on keyboard stuff
This commit is contained in:
17
index.ts
17
index.ts
@ -3,14 +3,25 @@ import {
|
||||
frame,
|
||||
} from "./window.ts";
|
||||
import { codeSheet } from "./sheet.ts";
|
||||
import { refreshKeyboard } from "./keyboard.ts";
|
||||
import { repl } from "./repl.ts";
|
||||
|
||||
const game = codeSheet(0);
|
||||
|
||||
game.init();
|
||||
|
||||
let mode: "play" | "edit" = "edit";
|
||||
|
||||
await mainloop((_t) => {
|
||||
// TODO: use t
|
||||
game.update();
|
||||
game.draw();
|
||||
frame();
|
||||
if (mode === "play") {
|
||||
game.update();
|
||||
game.draw();
|
||||
frame();
|
||||
} else if (mode === "edit") {
|
||||
repl.update();
|
||||
repl.draw();
|
||||
frame();
|
||||
}
|
||||
refreshKeyboard();
|
||||
});
|
||||
|
Reference in New Issue
Block a user