Skip to content

Commit

Permalink
Clean up the code to make it more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
ultimateprogramer authored Aug 19, 2022
1 parent 7ffad38 commit 4a0b59f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions sample/sample-module-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@
Demonstrate the use of the sample library
]]

local sum

function love.load()
love.graphics.setFont(love.graphics.newFont(11))

-- Will display all the modules loaded onto the console.
for key,value in pairs(love) do
print("found member " .. key);
end
end

function love.draw()
-- Gets the x- and y-position of the mouse.
local x = 50
local y = 50


-- Will use the `doSum` function for the `love.sample` module
local sum = love.sample.doSum(2, 4)
sum = love.sample.doSum(2, 4)
end

function love.draw()
-- Draws the position on screen.
love.graphics.print("The sum is " .. sum, 50, 50)
end
end

0 comments on commit 4a0b59f

Please sign in to comment.