let agents=[]; export function spawnAgent(){ agents.push({x:Math.random(),y:Math.random(),energy:1}); } export function updateAgents(){ agents.forEach(a=>a.energy*=0.999); }