function Canvas.getEmptySpot(S)if S:isFull()then return false,constants.Errors.CanvasFull end local k={}for S,F in ipairs(S.spots)do if not F:hasArt()then table.insert(k,F)end end local F=S.rng:NextInteger(1,#k)return true,k[F]end
--[[
	Finds an empty canvas spot and returns it.

	Returns:
	- isSuccess (boolean): true if spot can be found, false if the canvas is full
]]
function Canvas:getEmptySpot()
	if self:isFull() then
		return false, constants.Errors.CanvasFull
	end

	local emptySpots = {}
	for _, spot in ipairs(self.spots) do
		if not spot:hasArt() then
			table.insert(emptySpots, spot)
		end
	end

	local spotIndex = self.rng:NextInteger(1, #emptySpots)

	return true, emptySpots[spotIndex]
end
