{"size": 723, "ext": "js", "max_stars_repo_path": "scripts/entity.js", "max_stars_repo_name": "eduardomzhz/hunter-cat", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scripts/entity.js", "max_issues_repo_name": "eduardomzhz/hunter-cat", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scripts/entity.js", "max_forks_repo_name": "eduardomzhz/hunter-cat", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.3225806452, "max_line_length": 81, "alphanum_fraction": 0.5560165975}
class Entity {
  constructor(args) {
    args = args || {};
    this.color = args.color || '#FFFFFF';
    this.position = args.position || { x:100, y:100 };
    this.size = args.size || { x:50, y:50 };
  };

  collides(entity) {
    return (
      (
        this.position.x + this.size.x >= entity.position.x &&
        this.position.x <= entity.position.x + entity.size.x
      ) &&
      (
        this.position.y + this.size.y >= entity.position.y &&
        this.position.y <= entity.position.y + entity.size.y
      )
    );
  }

  draw(context) {
    context.fillStyle = this.color;
    context.fillRect(this.position.x, this.position.y, this.size.x, this.size.y);
  };

  update(step, gravity, canvas) {
    
  };
}
