{"size": 1034, "ext": "js", "max_stars_repo_path": "src/lib/core.js", "max_stars_repo_name": "Ashkettle/zero-sum", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/lib/core.js", "max_issues_repo_name": "Ashkettle/zero-sum", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/lib/core.js", "max_forks_repo_name": "Ashkettle/zero-sum", "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.5, "max_line_length": 79, "alphanum_fraction": 0.5502901354}
var Dunce = function(){
'use strict';


};


Dunce.Entity = function Entity(){
    'use strict';
    //Generate an Id.  GUIDs always work.
    var _id;
    var guid = function() {
        function s4() {
         return Math.floor((1 + Math.random()) * 0x10000)
               .toString(16)
               .substring(1);
          }
          return function() {
            return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
                   s4() + '-' + s4() + s4() + s4();
          };
    };
    _id = guid();
    this.id = _id;
    this._name = 'anonymous';  //The Entity can be named for debugging purposes

    // The component data will live in this object
    this.components = {};
    return this;
};

Dunce.Entity.prototype.addComponent = function( component ){
  'use strict';
    this.components[component.name] = component;
    return this;
};

Dunce.Entity.prototype.removeComponent = function( componentName ){
  'use strict';
    delete this.components[componentName];
    return this;
};

module.exports = Dunce;