Share your repls and programming experiences

← Back to all posts
My Lua Module - TERMINITE
08KINPLIX (83)

Terminite is used to make games and more in the lua console

Commentshotnewtop
08KINPLIX (83)

If you want to use my module Here is the source:

function ConsoleClear()
io.write("\027[H\027[2J")
end
--Rect
function drawRectHorizontal(Times, Y, X)
for y = 0, Y do
print("")
end
for x = 0, X do
io.write(" ")
end

for i = 1, Times do
io.write("▬")
end
end

function drawRectVerticle(Times, Y, X)
for y = 0, Y do
print("")
end
for x = 0, X do
io.write("")
end

for i = 1, Times do
io.write("▮")
end
end

function drawRectHorizontalNewLine(Times, Y, X)
for y = 0, Y do
print("")
end
for x = 0, X do
io.write("")
end

for i = 1, Times do
print("▬")
end
end

function drawRectVerticleNewLine(Times, Y, X)
for y = 0, Y do
print("")
end
for x = 0, X do
io.write("")
end

for i = 1, Times do
print("▮")
end
end
--Squares

08KINPLIX (83)

@08KINPLIX in the main lua file put
ter = require('TER')