From 4b2ecc6926f22523d4f5adbabdfd03c7b63369ae Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Wed, 20 Jan 2021 13:44:42 -0500 Subject: [PATCH] Added lines cleared count Dunno how I forgot that before --- ldris2.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ldris2.lua b/ldris2.lua index 5b802f6..cfae924 100644 --- a/ldris2.lua +++ b/ldris2.lua @@ -694,6 +694,8 @@ local handleLineClears = function(gameState) gameState.board.contents = newContents end + gameState.linesCleared = gameState.linesCleared + #clearedLines + return clearedLines end @@ -711,6 +713,7 @@ StartGame = function() paused = false, queue = {}, queueMinos = {}, + linesCleared = 0, } gameState.holdBoard = makeNewBoard( gameState.board.x + gameState.board.width + 1, @@ -902,13 +905,18 @@ StartGame = function() -- debug info + term.setCursorPos(2, scr_y - 2) + term.clearLine() + term.write("Lines cleared: " .. gameState.linesCleared) + term.setCursorPos(2, scr_y - 1) term.clearLine() - term.write("Position: (" .. mino.x .. ":" .. mino.xFloat .. ", " .. mino.y .. "), Subheight: " .. mino.yFloat .. " ") + term.write("Moves: " .. mino.movesLeft .. ", TimeToLock: " .. mino.lockTimer) term.setCursorPos(2, scr_y - 0) term.clearLine() - term.write("Moves: " .. mino.movesLeft .. ", TimeToLock: " .. mino.lockTimer .. " ") + term.write("Position: (" .. mino.x .. ":" .. mino.xFloat .. ", " .. mino.y .. "), Subheight: " .. mino.yFloat) + end local checkControl = function(controlName, repeatTime, repeatDelay)