local a={}function a.Enqueue(C,a)table.insert(C.queue,1,a)end function a.Dequeue(a)return table.remove(a.queue)end function a.Front(a)return a.queue[#a.queue]end function a.Back(a)return a.queue[1]end function a.Length(a)return#a.queue end local C={}C.__index=a local P={}P.new=function(a)return setmetatable({queue=a or{}},C)end return P
--queue, by me (boyned)
local QueueTemplate = {}

function QueueTemplate:Enqueue(value)
	table.insert(self.queue, 1, value)
end

function QueueTemplate:Dequeue()
	return table.remove(self.queue)
end

function QueueTemplate:Front()
	return self.queue[#self.queue]
end

function QueueTemplate:Back()
	return self.queue[1]
end

function QueueTemplate:Length()
	return #self.queue
end

local QueueMetatable = {}
QueueMetatable.__index = QueueTemplate

local Queue = {}

Queue.new = function(list)
	return setmetatable({
		queue = list or {}
	}, QueueMetatable)
end

return Queue
