From 9f5cc15e62b59b30d65df264eacff1ccd7c4c61d Mon Sep 17 00:00:00 2001 From: OgelGames Date: Wed, 26 Feb 2020 10:43:11 +0000 Subject: [PATCH] add nil checks in tetris step function --- computer/tetris.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/computer/tetris.lua b/computer/tetris.lua index 85e9151..74dfd93 100644 --- a/computer/tetris.lua +++ b/computer/tetris.lua @@ -1,4 +1,3 @@ - local S = homedecor.gettext local shapes = { @@ -220,10 +219,10 @@ local function step(pos, fields) if fields then if fields.new then new_game(pos) - else + elseif t then key(fields) end - else + elseif t then run = tick() end