local isLove = false if love ~= nil then lutro = love isLove = true end local ball_x = 10 local ball_y = 10 local ball_speed_x = 1 local ball_speed_y = 1 local points = 0 local paddle_y = 0 local control = require("controllutro") if isLove then control = require("control") end local function round(value) return math.floor(value + 0.5) end local screeny = lutro.graphics.getHeight() local screenx = lutro.graphics.getWidth() local grid_x = round(screenx / 5) local grid_y = round(screeny / 5) - 6 local paddle_hght = round(screeny / 5) local paddle_wght = round(paddle_hght / 6) local font local debugfont local fontsize = 10 if isLove then font = lutro.graphics.newFont(80) debugfont = lutro.graphics.newFont(10) fontsize = 80 end local speed = 6 function lutro.load() if isLove then lutro.window.setMode(640, 480, {["resizable"] = true}) end screenx = lutro.graphics.getWidth() screeny = lutro.graphics.getHeight() grid_x = round(screenx / 5) grid_y = round(screeny / 5) end local function update