digger = { }

function digger:init( )
	self._diggerTable = { }
	digger:new(1, 2, 2)
	digger:new(2, 3, 3, 1)

end

function digger:new(_type, _x, _y, _attachTO)
	-- type = 1 MASTER, 2 little digger
	local temp = { 
		tp = _type,
		x = _x,
		y = _y,
		life = 2000,
		ox = 1,
		oy = 1,
	}
	if temp.tp == 2 then
		temp.daddy = _attachTO
		temp.x = self._diggerTable[_attachTO].x
		temp.y = self._diggerTable[_attachTO].y
		temp.ox = math.random(1,4)
		temp.oy = math.random(1,4)
	end

	table.insert(self._diggerTable, temp)
	pgMap:setTile(temp.x, temp.y)
end

function digger:loop( )
	for i,v in ipairs(self._diggerTable) do

	end
end