Leveling system
This commit is contained in:
parent
362a4e39ee
commit
efe9f386bd
6 changed files with 83 additions and 26 deletions
6
line.lua
6
line.lua
|
|
@ -8,7 +8,6 @@ require 'gridpoint'
|
|||
---@field points GridPoint[]
|
||||
---@field color Color
|
||||
Line = {
|
||||
|
||||
startpoint = GridPoint:new( GridPoint:coords() ),
|
||||
endpoint = GridPoint:new( GridPoint:coords() ),
|
||||
points = { },
|
||||
|
|
@ -95,3 +94,8 @@ function Line:has( point )
|
|||
end
|
||||
)
|
||||
end
|
||||
|
||||
-- Check if line's endpoints are connected
|
||||
function Line:endpointsConnected()
|
||||
return self.points[#self.points]:equals( self.endpoint )
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue