From b728bfb0476349570b9745000fb43ac174ac271a Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Tue, 16 Jun 2026 22:30:46 -0400 Subject: [PATCH] remove insanity checking --- res/example.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/example.lua b/res/example.lua index 80dda8e..e6ede2f 100644 --- a/res/example.lua +++ b/res/example.lua @@ -60,9 +60,9 @@ function draw() for i, v in ipairs(squares) do v.x = v.x + v.vx v.y = v.y + v.vy - if v.x <= 0 then v.vx = 1; v.color = math.random(0xFFFFFF) end + if v.x == 0 then v.vx = 1; v.color = math.random(0xFFFFFF) end if v.x + SQUARE_WIDTH >= ly.width-1 then v.vx = -1; v.color = math.random(0xFFFFFF) end - if v.y <= 0 then v.vy = 1; v.color = math.random(0xFFFFFF) end + if v.y == 0 then v.vy = 1; v.color = math.random(0xFFFFFF) end if v.y + SQUARE_HEIGHT >= ly.height-1 then v.vy = -1; v.color = math.random(0xFFFFFF) end end timer = ly.clock()