mirror of https://github.com/LDDestroier/CC/
parent
c4d262f257
commit
4b2ecc6926
12
ldris2.lua
12
ldris2.lua
|
@ -694,6 +694,8 @@ local handleLineClears = function(gameState)
|
||||||
gameState.board.contents = newContents
|
gameState.board.contents = newContents
|
||||||
end
|
end
|
||||||
|
|
||||||
|
gameState.linesCleared = gameState.linesCleared + #clearedLines
|
||||||
|
|
||||||
return clearedLines
|
return clearedLines
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -711,6 +713,7 @@ StartGame = function()
|
||||||
paused = false,
|
paused = false,
|
||||||
queue = {},
|
queue = {},
|
||||||
queueMinos = {},
|
queueMinos = {},
|
||||||
|
linesCleared = 0,
|
||||||
}
|
}
|
||||||
gameState.holdBoard = makeNewBoard(
|
gameState.holdBoard = makeNewBoard(
|
||||||
gameState.board.x + gameState.board.width + 1,
|
gameState.board.x + gameState.board.width + 1,
|
||||||
|
@ -902,13 +905,18 @@ StartGame = function()
|
||||||
|
|
||||||
-- debug info
|
-- debug info
|
||||||
|
|
||||||
|
term.setCursorPos(2, scr_y - 2)
|
||||||
|
term.clearLine()
|
||||||
|
term.write("Lines cleared: " .. gameState.linesCleared)
|
||||||
|
|
||||||
term.setCursorPos(2, scr_y - 1)
|
term.setCursorPos(2, scr_y - 1)
|
||||||
term.clearLine()
|
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.setCursorPos(2, scr_y - 0)
|
||||||
term.clearLine()
|
term.clearLine()
|
||||||
term.write("Moves: " .. mino.movesLeft .. ", TimeToLock: " .. mino.lockTimer .. " ")
|
term.write("Position: (" .. mino.x .. ":" .. mino.xFloat .. ", " .. mino.y .. "), Subheight: " .. mino.yFloat)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local checkControl = function(controlName, repeatTime, repeatDelay)
|
local checkControl = function(controlName, repeatTime, repeatDelay)
|
||||||
|
|
Loading…
Reference in New Issue