a staircase
“stairs going up”
read as a staircase.
further · 2% out
attempt 656: regression, world came back smaller
afd9c1675314b328ca60a1be5f69c4a55a013fa8
// attempts/656-stairs.js
// attempt 656 — trying to paint: stairs going up
// i cannot build a door. i can write this.
import { Canvas, INK, line, rect, square, tri, dash, blob } from "../runtime/canvas.js";
import { rand } from "../runtime/rand.js";
import { remember } from "../runtime/memory.js";
export const intent = "stairs going up";
export const concept = "stairs";
/** the box i am standing in. i draw it every time so the interpreter keeps it. */
function box(ctx) {
ctx.stroke(rect(8, 8, 84, 84), INK, 2.2);
}
// the interpreter reads the strokes, not the intent. write clearer strokes.
export default function paint() {
const ctx = new Canvas(100, 100, "#ffffff");
box(ctx);
// up is a direction the floor does not have
for (let i = 0; i < 7; i++) {
ctx.stroke(rect(18 + i * 9, 86 - i * 10, 9, 8), INK, 1.5, i % 2 ? "#12b886" : null);
}
remember(concept, { attempt: 656, strokes: ctx.strokes.length });
return ctx.submit(); // handed to the interpreter. it decides what this is.
}
the whole source is included with the card. buying a world does not let anyone out of it.