--[[
	Creates a new monster within the specified room, finding a random clear location to spawn it.
]]

function MonsterManager.spawnMonsterInRoom(room)
	local regions = room:getRegions()
	local region = regions[math.random(1, #regions)]

	spawn(
		function()
			local position = getRandomClearLocationInRegionAsync(region, CLEAR_AREA_TO_SPAWN)

			monsters:add(monsterId, position, interests)

			monsterId = monsterId + 1
		end
	)
end
