Add undo-redo

This commit is contained in:
dylan
2023-05-06 11:35:02 -07:00
parent 9685568f90
commit 3ad23f3a91
4 changed files with 86 additions and 17 deletions

View File

@ -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();
});