mirror of
https://github.com/LDDestroier/CC/
synced 2024-07-01 01:23:17 +00:00
Update tron
This commit is contained in:
parent
5790d6b81f
commit
a6d0574866
28
tron
28
tron
|
@ -24,18 +24,22 @@ local player = {
|
||||||
--draws grid and background at scroll 'x' and 'y'
|
--draws grid and background at scroll 'x' and 'y'
|
||||||
local drawGrid = function(x, y)
|
local drawGrid = function(x, y)
|
||||||
local gridBack = {
|
local gridBack = {
|
||||||
" ",
|
" ",
|
||||||
" ########",
|
" ",
|
||||||
" ########",
|
" ############",
|
||||||
" ########",
|
" ############",
|
||||||
" ########",
|
" ############",
|
||||||
" ########",
|
" ############",
|
||||||
|
" ############",
|
||||||
|
" ############",
|
||||||
|
" ############",
|
||||||
}
|
}
|
||||||
local gridFore = {
|
local gridFore = {
|
||||||
"+-----",
|
"+-------",
|
||||||
"| ",
|
"| ",
|
||||||
"| ",
|
"| ",
|
||||||
"| "
|
"| ",
|
||||||
|
"| "
|
||||||
}
|
}
|
||||||
local bg = {{},{},{}}
|
local bg = {{},{},{}}
|
||||||
local foreX, foreY
|
local foreX, foreY
|
||||||
|
@ -81,7 +85,9 @@ end
|
||||||
|
|
||||||
-- test background drawing
|
-- test background drawing
|
||||||
|
|
||||||
|
local y = 0
|
||||||
for x = grid.x1-10, grid.x2+10 do
|
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)
|
sleep(0.05)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user