Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,83 @@
$ include "seed7_05.s7i";
include "draw.s7i";
include "keybd.s7i";
const integer: delta is 8;
const proc: drawDown (inout integer: x, inout integer: y, in integer: n) is forward;
const proc: drawUp (inout integer: x, inout integer: y, in integer: n) is forward;
const proc: drawRight (inout integer: x, inout integer: y, in integer: n) is func
begin
if n > 0 then
drawDown(x, y, pred(n));
line(x, y, 0, delta, white);
y +:= delta;
drawRight(x, y, pred(n));
line(x, y, delta, 0, white);
x +:= delta;
drawRight(x, y, pred(n));
line(x, y, 0, -delta, white);
y -:= delta;
drawUp(x, y, pred(n));
end if;
end func;
const proc: drawLeft (inout integer: x, inout integer: y, in integer: n) is func
begin
if n > 0 then
drawUp(x, y, pred(n));
line(x, y, 0, -delta, white);
y -:= delta;
drawLeft(x, y, pred(n));
line(x, y, -delta, 0, white);
x -:= delta;
drawLeft(x, y, pred(n));
line(x, y, 0, delta, white);
y +:= delta;
drawDown(x, y, pred(n));
end if;
end func;
const proc: drawDown (inout integer: x, inout integer: y, in integer: n) is func
begin
if n > 0 then
drawRight(x, y, pred(n));
line(x, y, delta, 0, white);
x +:= delta;
drawDown(x, y, pred(n));
line(x, y, 0, delta, white);
y +:= delta;
drawDown(x, y, pred(n));
line(x, y, -delta, 0, white);
x -:= delta;
drawLeft(x, y, pred(n));
end if;
end func;
const proc: drawUp (inout integer: x, inout integer: y, in integer: n) is func
begin
if n > 0 then
drawLeft(x, y, pred(n));
line(x, y, -delta, 0, white);
x -:= delta;
drawUp(x, y, pred(n));
line(x, y, 0, -delta, white);
y -:= delta;
drawUp(x, y, pred(n));
line(x, y, delta, 0, white);
x +:= delta;
drawRight(x, y, pred(n));
end if;
end func;
const proc: main is func
local
var integer: x is 11;
var integer: y is 11;
begin
screen(526, 526);
KEYBOARD := GRAPH_KEYBOARD;
drawRight(x, y, 6);
readln(KEYBOARD);
end func;