<commit_before>'use strict';

function makeString(foods) {
  return foods.toString();
}

function update () {
  var labelSprite = _.find(this.sprite.children, function(child) {
    return child instanceof Phaser.Text;
  });

  if (labelSprite) {
    labelSprite.setText(makeString(this.foods));
  }
}

var Plate = function Plate(foods, sprite) {
  this.foods = foods;
  this.sprite = sprite;
  update.call(this);
};

Plate.prototype.update = update;

module.exports = Plate;<commit_msg>Print foods in a vertical stack<commit_after>'use strict';

function makeString(foods) {
  return foods.join('\n');
}

function update () {
  var labelSprite = _.find(this.sprite.children, function(child) {
    return child instanceof Phaser.Text;
  });

  if (labelSprite) {
    var label = makeString(this.foods);
    labelSprite.setText(label);
    labelSprite.y = 20 - 30 * this.foods.length;
  }
}

var Plate = function Plate(foods, sprite) {
  this.foods = foods;
  this.sprite = sprite;
  update.call(this);
};

Plate.prototype.update = update;

module.exports = Plate;
{'fraction_non_alphanumeric': 0.1374764595103578, 'fraction_numerical': 0.003766478342749529, 'mean_word_length': 3.967289719626168, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7614607', 'n_tokens_mistral': 367, 'n_tokens_neox': 348, 'n_words': 77}