<commit_before>function Tile(color) {
  this.color = color;
  this.createElement();
}

Tile.prototype.createElement = function() {
  this.canvas = document.createElement('td');
  var div = document.createElement('div');
  div.className = this.color;
  this.canvas.appendChild(div)
  EventHandler.clickEvent(this.canvas, this.handleClick.bind(this));
};

Tile.prototype.render = function() {
  this.canvas.children[0].className = this.color;
  return this.canvas;
};

Tile.prototype.handleClick = function(event) {
  EventHandler.notify('newTile', this, { column: this.getColumn() });
};<commit_msg>Make it impossible to launch two tiles at the same time<commit_after>function Tile(color) {
  this.color = color;
  this.newTileTime = 0;
  this.createElement();
}

Tile.prototype.createElement = function() {
  this.canvas = document.createElement('td');
  var div = document.createElement('div');
  div.className = this.color;
  this.canvas.appendChild(div)
  EventHandler.clickEvent(this.canvas, this.handleClick.bind(this));
};

Tile.prototype.render = function() {
  this.canvas.children[0].className = this.color;
  return this.canvas;
};

Tile.prototype.handleClick = function(event) {
  var timeInMs = Date.now();
  if (this.newTileTime < timeInMs - 600) {
    EventHandler.notify('newTile', this, { column: this.getColumn() });
    this.newTileTime = timeInMs;
  }
};
{'fraction_non_alphanumeric': 0.15149308084486526, 'fraction_numerical': 0.004369992716678805, 'mean_word_length': 4.773109243697479, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1957739', 'n_tokens_mistral': 430, 'n_tokens_neox': 425, 'n_words': 79}