var w : int := Window.Open ("fullscreen")
Window.Set (w, "nocursor")
setscreen ("graphics")
% Background
drawbox ( - 1, - 1, 800, 601, 54)
drawfill (1, 1, 16, 54)
% Basic
drawline (100, 5, 150, 26, 55)
drawline (100, 55, 150, 26, 55)
drawline (100, 55, 100, 5, 55)
drawfill (105, 16, 55, 55)
%Controls
var x, e : int
var c : string (1)
x := 0
loop
getch (c)
if c = chr (200) and x < 540 then
drawline (100, x, 150, 21 + x, 55)
drawline (100, 50 + x, 150, 21 + x, 55)
drawline (100, 50 + x, 100, x, 55)
drawfill (1, 1, 16, 54)
x := x + 5
e := 26 + x
elsif c = chr (208) and x > 0 then
drawline (100, 10 + x, 150, 31 + x, 55)
drawline (100, 60 + x, 150, 31 + x, 55)
drawline (100, 60 + x, 100, 10 + x, 55)
drawfill (1, 1, 16, 54)
x := x - 5
e := 26 + x
elsif c = chr (205) then
for t : 1 .. 700 by 10
drawline (150 + t, e, 180 + t, e, red)
delay (10)
drawline (150 + t, e, 180 + t, e, 16)
end for
end if
drawline (100, 5 + x, 150, e, 55)
drawline (100, 55 + x, 150, e, 55)
drawline (100, 55 + x, 100, 5 + x, 55)
drawfill (105, 15 + x, 55, 55)
end loop
|