Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create()
- new = {}
- return new
- end
- function set(array, x, y, value)
- index = x..":"..y
- array[index] = value
- end
- function get(array, x, y)
- index = x..":"..y
- return array[index]
- end
- function remove(array, x, y)
- index = x..":"..y
- array[index] = nil
- end
- function size(array)
- numItems = 0
- for k,v in pairs(array) do
- numItems = numItems + 1
- end
- return(numItems)
- end
Advertisement
Add Comment
Please, Sign In to add comment