xxxxxxxxxx
18
function Agent() {
this.x = random(windowWidth);
this.y = random(windowHeight);
this.lastX = this.x;
this.lastY = this.y;
}
Agent.prototype.draw = function() {
//fill(random(255), random(255), random(255));
// ellipse(this.x, this.y, 40, 40);
stroke(90, 50);
line(this.lastX, this.lastY, this.x, this.y);
this.lastX = this.x;
this.lastY = this.y;
this.x = this.x + random(10) - 5;
this.y = this.y + random(10) - 5;
}