1 MinuteCount = class(function(obj, minutes)
7 function MinuteCount:add()
8 self.current = self.current + 1
11 function MinuteCount:moveon()
12 table.insert(self.data, 0, self.current)
13 table.remove(self.data, self.minutes)
17 function MinuteCount:sum()
18 local sum = self.current
19 for _, v in ipairs(self.data) do