function Player() {
    let pos = { x: Math.random() * 5000 - 50, y: Math.random() * 5000 - 50 };
    let camera = { x: -pos.x, y: -pos.y };
    let vel = { x: 0, y: 0 };

    this.camera = camera;
    this.pos = pos;
    this.vel = vel;
    this.rot = 0;
    this.dir = 1;
    this.ticks = 0;

    this.health = 100;
}

Player.prototype.bump = function () {
    let player = this;

    if (player.ticks < 10) {
        player.dir *= -1;
    }

    player.vel.x *= 0.3;
    player.vel.y *= 0.3;

    player.vel.x += Math.sin(player.rot) * 12;
    player.vel.y -= Math.cos(player.rot) * 12;

    player.ticks = 0;
}