CodexCapsule / agents.js
LordXido's picture
Create agents.js
c73d07c verified
raw
history blame
179 Bytes
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);
}