{"size": 1128, "ext": "js", "max_stars_repo_path": "assets/javascript/application.js", "max_stars_repo_name": "demns/demns.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/javascript/application.js", "max_issues_repo_name": "demns/demns.github.io", "max_issues_repo_issues_event_min_datetime": "2016-03-12T07:33:11.000Z", "max_issues_repo_issues_event_max_datetime": "2016-03-12T07:33:11.000Z", "max_forks_repo_path": "assets/javascript/application.js", "max_forks_repo_name": "demns/demns.github.io", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 21.2830188679, "max_line_length": 139, "alphanum_fraction": 0.5913120567}
(function() {
  Cell = Backbone.Model.extend({

  });

  Cells = Backbone.Collection.extend({
    model: Cell
  });

  CellView = Backbone.View.extend({
    tagName: 'td',
    className: TTTApplication.cellClassName,

    events: {
      click: 'changeState'
    },

    changeState: function() {
      TTTApplication.makeMove(this.el);
    },

    render: function() {
      $(this.el).html(TTTApplication.svgOpenTag + TTTApplication.svgCloseTag + _.template($(TTTApplication.cellTemplateQuery).html(), {}));
      return this;
    }
  });

  CellsView = Backbone.View.extend({
    el: $(TTTApplication.mainDivItemQuery),

    render: function() {
      this.collection.each(function(cell) {

        var currCellNumber = cell.attributes.name,
          lastBodyItemQuery = 'table#cells > tbody:last',
          cellView = new CellView({
            model: cell
          }),
          tableLast = $(lastBodyItemQuery);

        tableLast.append(cellView.render().el);

        if (currCellNumber % 3 === 0) {
          tableLast.append(TTTApplication.newRow);
        }

      });
    }
  });

  TTTApplication.setup();
}());
