2021-03-10 12:15:06 +00:00
|
|
|
local M = {}
|
2021-07-16 15:58:44 +00:00
|
|
|
-- local ulog = require("go.utils").log
|
2021-03-10 12:15:06 +00:00
|
|
|
M.intersects = function(row, col, sRow, sCol, eRow, eCol)
|
2021-07-16 15:58:44 +00:00
|
|
|
-- ulog(row, col, sRow, sCol, eRow, eCol)
|
2021-03-10 12:15:06 +00:00
|
|
|
if sRow > row or eRow < row then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
if sRow == row and sCol > col then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
if eRow == row and eCol < col then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|