{"size": 551, "ext": "js", "max_stars_repo_path": "js/background.js", "max_stars_repo_name": "Barbara-Monzu/black-jack-game", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/background.js", "max_issues_repo_name": "Barbara-Monzu/black-jack-game", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/background.js", "max_forks_repo_name": "Barbara-Monzu/black-jack-game", "max_forks_repo_forks_event_min_datetime": "2021-10-31T20:06:27.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-31T20:06:27.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 16.696969697, "max_line_length": 102, "alphanum_fraction": 0.5716878403}
class Background {
  constructor(ctx, posX, posY, width, height, imageName) {
    this.ctx = ctx

    this.pos = {
      x: posX,
      y: posY
    }

    this.size = {
      width: width,
      height: height
    }

    this.imageInstance = undefined;
    this.imageName = imageName;

    this.init();
  }

  init() {
    this.imageInstance = new Image();
    this.imageInstance.src = `img/${this.imageName}`;
  }

  draw() {
    this.ctx.drawImage(this.imageInstance, this.pos.x, this.pos.y, this.size.width, this.size.height);
    
  }

  
    
  }