class Player { init(opts){ this.width = opts && opts.width ? opts.width : 20; this.height = opts && opts.height ? opts.height : 20; this.x = opts && opts.x ? opts.x : 0; this.y = opts && opts.y ? opts.y : 0; this.vy = 0; this.agility = opts && opts.agility ? opts.agility : 5; this.jumpPower = opts && opts.jumpPower ? opts.jumpPower : 20; this.jumping = 0; } }