1
0
mirror of https://github.com/LDDestroier/CC/ synced 2025-05-28 17:44:05 +00:00

Update tron

This commit is contained in:
LDDestroier 2018-11-13 15:17:08 -05:00 committed by GitHub
parent ffef03b593
commit e16c37678c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

18
tron
View File

@ -21,10 +21,8 @@ local player = {
color = colors.blue color = colors.blue
} }
--draws grid and background at scroll 'x' and 'y' local gridFore = {
local drawGrid = function(x, y) " ",
x, y = math.floor(x + 0.5), math.floor(y + 0.5)
local gridBack = {
" ", " ",
" ", " ",
" ############", " ############",
@ -34,14 +32,20 @@ local drawGrid = function(x, y)
" ############", " ############",
" ############", " ############",
" ############", " ############",
} }
local gridFore = { local gridBack = {
"+-------", "+-------",
"| ", "| ",
"| ", "| ",
"| ", "| ",
"| " "| "
} }
for y = 1, gridFore do
gridFore[y] = gridFore[y]:gsub("#","\127")
--draws grid and background at scroll 'x' and 'y'
local drawGrid = function(x, y)
x, y = math.floor(x + 0.5), math.floor(y + 0.5)
local bg = {{},{},{}} local bg = {{},{},{}}
local foreX, foreY local foreX, foreY
local backX, backY local backX, backY