Initial commit
This commit is contained in:
commit
f765ec74ef
6 changed files with 181 additions and 0 deletions
32
main.lua
Normal file
32
main.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
require "grid"
|
||||
require "point"
|
||||
require "line"
|
||||
|
||||
function love.load()
|
||||
love.graphics.setLineStyle( Config.lineStyle )
|
||||
love.graphics.setLineWidth( Config.lineWidth )
|
||||
|
||||
gameGrid = Grid:new( Point:new( 5, 5 ) )
|
||||
local line = Line:new(
|
||||
GridPoint:new( 1, 1 ),
|
||||
GridPoint:new( 3, 3 ),
|
||||
Color.red
|
||||
)
|
||||
line:push( GridPoint:new( 1, 2 ) )
|
||||
line:push( GridPoint:new( 1, 3 ) )
|
||||
line:push( GridPoint:new( 2, 3 ) )
|
||||
line:push( GridPoint:new( 2, 2 ) )
|
||||
line:push( GridPoint:new( 2, 1 ) )
|
||||
line:push( GridPoint:new( 3, 1 ) )
|
||||
line:push( GridPoint:new( 3, 2 ) )
|
||||
line:push( GridPoint:new( 3, 3 ) )
|
||||
gameGrid:push( line )
|
||||
end
|
||||
|
||||
function love.update( dt )
|
||||
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
gameGrid:draw()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue