摘要: Window = {} Window.prototype = {x = 0, y = 0, width = 70, height = 100} Window.mt = {} function Window.new(o) setmetatable(o, Window.mt) return o end --[[Window.mt.__index = function (table... 阅读全文
posted @ 2016-09-24 22:06 zzyoucan 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Set = {} Set.mt = {} function Set.new(t) local set = {} setmetatable(set, Set.mt) for _, l in ipairs(t) do set[l] = true end return set end function Set.union(a, b) local res = S... 阅读全文
posted @ 2016-09-24 00:33 zzyoucan 阅读(187) 评论(0) 推荐(0) 编辑