xxxxxxxxxx
27
class Item {
constructor() {
}
show() {
this.realX = (this.i * this.maze.size) + (this.maze.size * (1/2));
this.realY = (this.j * this.maze.size) + (this.maze.size * (1/2));
fill(0, 0, 255);
ellipseMode(CENTER);
ellipse(this.realX, this.realY, this.maze.size * (3/5));
}
registerMaze(maze) {
this.maze = maze;
this.i = floor(random(this.maze.cols));
this.j = floor(random(this.maze.rows));
print(this.i + " : " + this.j);
}
}