19 lines
299 B
Lua
19 lines
299 B
Lua
function init()
|
|
x, y, dx, dy = 0, 0, 1, 1
|
|
paper(COLOR_BLACK)
|
|
ink(COLOR_RED)
|
|
end
|
|
|
|
function update()
|
|
cls()
|
|
x = x + dx
|
|
y = y + dy
|
|
if x == 39 or x == 0 then
|
|
dx = -dx
|
|
end
|
|
if y == 29 or y == 0 then
|
|
dy = -dy
|
|
end
|
|
locate(x, y)
|
|
print("\224")
|
|
end |