Add undo-redo
This commit is contained in:
5
index.ts
5
index.ts
@ -3,7 +3,8 @@ import {
|
||||
frame,
|
||||
clearScreen,
|
||||
} from "./window.ts";
|
||||
import { codeSheet } from "./sheet.ts";
|
||||
import { runCode } from "./runcode.ts";
|
||||
import { getCodeSheet } from "./sheet.ts";
|
||||
import { refreshKeyboard, keyPressed, K } from "./keyboard.ts";
|
||||
import { repl, resetRepl } from "./repl.ts";
|
||||
import { addToContext } from "./runcode.ts";
|
||||
@ -17,7 +18,7 @@ let mode: "play" | "edit" | "repl" = "repl";
|
||||
|
||||
addToContext("play", () => {
|
||||
mode = "play";
|
||||
game = codeSheet(0);
|
||||
game = runCode(getCodeSheet(0));
|
||||
game.init();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user