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
1 changed files with 22 additions and 18 deletions

40
tron
View File

@ -21,27 +21,31 @@ local player = {
color = colors.blue
}
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 gridBack = {
" ",
" ",
" ############",
" ############",
" ############",
" ############",
" ############",
" ############",
" ############",
}
local gridFore = {
"+-------",
"| ",
"| ",
"| ",
"| "
}
local bg = {{},{},{}}
local foreX, foreY
local backX, backY