Update tron

This commit is contained in:
LDDestroier 2018-11-15 22:33:29 -05:00 committed by GitHub
parent e8ce7cf1b9
commit 105544a6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 23 deletions

47
tron
View File

@ -239,6 +239,30 @@ for k,v in pairs(images) do
end
end
local tocolors
local toblit = {
[0] = " ",
[colors.white] = "0",
[colors.orange] = "1",
[colors.magenta] = "2",
[colors.lightBlue] = "3",
[colors.yellow] = "4",
[colors.lime] = "5",
[colors.pink] = "6",
[colors.gray] = "7",
[colors.lightGray] = "8",
[colors.cyan] = "9",
[colors.purple] = "a",
[colors.blue] = "b",
[colors.brown] = "c",
[colors.green] = "d",
[colors.red] = "e",
[colors.black] = "f"
}
for k,v in pairs(toblit) do
tocolors[v] = k
end
local drawImage = function(im, x, y)
local cx, cy = term.getCursorPos()
term.setBackgroundColor(tocolors[initGrid.voidcol])
@ -289,29 +313,6 @@ local ageTrails = function()
end
end
end
local tocolors
local toblit = {
[0] = " ",
[colors.white] = "0",
[colors.orange] = "1",
[colors.magenta] = "2",
[colors.lightBlue] = "3",
[colors.yellow] = "4",
[colors.lime] = "5",
[colors.pink] = "6",
[colors.gray] = "7",
[colors.lightGray] = "8",
[colors.cyan] = "9",
[colors.purple] = "a",
[colors.blue] = "b",
[colors.brown] = "c",
[colors.green] = "d",
[colors.red] = "e",
[colors.black] = "f"
}
for k,v in pairs(toblit) do
tocolors[v] = k
end
local control = {
up = keys.up,