Add pi and directions
This commit is contained in:
@@ -9,8 +9,8 @@ fillEllipse,
|
||||
outlineEllipse,
|
||||
setPixelColor,
|
||||
} from "./window.ts";
|
||||
import { Font, font } from "./font.ts";
|
||||
import { keyDown, keyPressed, keyReleased } from "./keyboard.ts";
|
||||
import { CHAR, Font, font } from "./font.ts";
|
||||
import { K, keyDown, keyPressed, keyReleased } from "./keyboard.ts";
|
||||
import { addToContext, runCode } from "./runcode.ts";
|
||||
import { resetRepl } from "./repl.ts";
|
||||
import { COLOR } from "./colors.ts";
|
||||
@@ -134,6 +134,10 @@ const faux = {
|
||||
getMapSheet(mapSheet)[y*64+x] = [sprSheet, spr];
|
||||
},
|
||||
// Input
|
||||
[CHAR.UP]: K.ARROW_UP,
|
||||
[CHAR.DOWN]: K.ARROW_DOWN,
|
||||
[CHAR.LEFT]: K.ARROW_LEFT,
|
||||
[CHAR.RIGHT]: K.ARROW_RIGHT,
|
||||
btn: keyDown,
|
||||
btnp: keyPressed,
|
||||
btnr: keyReleased,
|
||||
@@ -176,6 +180,7 @@ const faux = {
|
||||
sqrt: Math.sqrt,
|
||||
abs: Math.abs,
|
||||
rand: Math.random,
|
||||
[CHAR.PI]: Math.PI,
|
||||
// Other
|
||||
code: (n: number) => {
|
||||
return runCode(getCodeSheet(n));
|
||||
|
||||
Reference in New Issue
Block a user