import {getRandomInt} from "./utils"

export class Circle {

	constructor(x, y, r, col = [], data = {}) {

		this.x = x;
		this.y = y;
		this.r = r;
		this.status = true;
		this.data = data;

		let red = col[0] || getRandomInt(0, 255);
		let green = col[1] || getRandomInt(0, 255);
		let blue = col[2] || getRandomInt(0, 255);

		this.color = color(red, green, blue);
	}

	draw () {

		fill(this.color);
		ellipse(this.x, this.y, this.r, this.r);
	}
}
