1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-06-28 16:13:18 +00:00

Update tron

This commit is contained in:
LDDestroier 2018-11-13 15:07:47 -05:00 committed by GitHub
parent 5790d6b81f
commit a6d0574866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

28
tron
View File

@ -24,18 +24,22 @@ local player = {
--draws grid and background at scroll 'x' and 'y'
local drawGrid = function(x, y)
local gridBack = {
" ",
" ########",
" ########",
" ########",
" ########",
" ########",
" ",
" ",
" ############",
" ############",
" ############",
" ############",
" ############",
" ############",
" ############",
}
local gridFore = {
"+-----",
"| ",
"| ",
"| "
"+-------",
"| ",
"| ",
"| ",
"| "
}
local bg = {{},{},{}}
local foreX, foreY
@ -81,7 +85,9 @@ end
-- test background drawing
local y = 0
for x = grid.x1-10, grid.x2+10 do
drawGrid(x, 0)
y = math.sin(math.rad(x * 10)) * 30
drawGrid(x, y)
sleep(0.05)
end