Update tron

This commit is contained in:
LDDestroier 2018-11-15 22:32:30 -05:00 committed by GitHub
parent 3ae9b7b1a2
commit e8ce7cf1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

8
tron
View File

@ -241,7 +241,8 @@ end
local drawImage = function(im, x, y)
local cx, cy = term.getCursorPos()
term.setBackgroundColor(colors.black)
term.setBackgroundColor(tocolors[initGrid.voidcol])
term.setTextColor(tocolors[initGrid.voidcol])
for iy = 1, #im[1] do
for ix = 1, #im[1][iy] do
term.setCursorPos(x+(ix-1),y+(iy-1))
@ -288,7 +289,7 @@ local ageTrails = function()
end
end
end
local tocolors
local toblit = {
[0] = " ",
[colors.white] = "0",
@ -308,6 +309,9 @@ local toblit = {
[colors.red] = "e",
[colors.black] = "f"
}
for k,v in pairs(toblit) do
tocolors[v] = k
end
local control = {
up = keys.up,