xxxxxxxxxx
21
let heart = [
[0, 1, 1, 0, 1, 1, 0],
[1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 0],
[0, 0, 1, 1, 1, 0, 0],
[0, 0, 0, 1, 0, 0, 0]
];
class Block {
constructor (x, y, s) {
this.pos = createVector(x, y);
this.s = s;
}
show() {
point(this.pos.x, this.pos.y, this.s )
noFill()
stroke(255,0,0)
rect(this.pos.x, this.pos.y, this.s)
}
}