constructor this.myPos
? class Body {
constructor(x, y){
this.x = x;
this.y = y;
this.size = {width:19, height:19};
this.myPos = {x : canvas.width / 2 - this.size.width, y : canvas.height / 2 - this.size.height};
}
}
App.prototype.draw = function(){
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillRect(this.myPos.x, this.myPos.y, 50, 50);
}