Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if matrix[x] and matrix[x][y] then
- -- Делаем что-то с этим элементом
- end
- setmetatable(matrix, {
- __call = function(self, x, y)
- result = self[x] == nil
- if result
- then
- return result
- else
- return self[x][y]
- end
- end,
- })
- content = matrix(x, y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement