From e16c37678c79f6e08f73b73bcb57a025640dd9d2 Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Tue, 13 Nov 2018 15:17:08 -0500 Subject: [PATCH] Update tron --- tron | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/tron b/tron index 1218da5..46ace12 100644 --- a/tron +++ b/tron @@ -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