Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCellsInRectangle(topLeft, bottomLeft)
- --topLeft -> cell in top left of rectangle
- --bottomLeft -> cell in bottom left of rectangle
- local cells = {}
- for x = topLeft.X, bottomLeft.X do
- for y = topLeft.Y, bottomLeft.Y do
- cells[#cells + 1] = CPos.New(x, y)
- end
- end
- return cells
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement