<commit_before># Acts and interacts with other Entities within a Stage.
class Yeah::Entity
  include Yeah

  def initialize(properties=V[])
    properties = { position: properties } unless properties.respond_to?(:to_h)
    properties = properties.to_h

    properties.each do |key, val|
      writer = "#{key}="
      send(writer, val)
    end
  end

  # The stage this is in.
  #
  # @return [Stage]
  def stage
    @stage ||= NullStage.new
  end
  def stage=(value)
    @stage = value
    @stage.entities << self unless @stage.entities.include? self
  end

  def game
    stage.game
  end

  # Position within the stage.<commit_msg>idiomatized Entity#initialize<commit_after># Acts and interacts with other Entities within a Stage.
class Yeah::Entity
  include Yeah

  def initialize(properties = V[])
    properties = { position: properties } unless properties.respond_to?(:to_h)
    properties = properties.to_h

    properties.each do |key, val|
      writer = "#{key}="
      send(writer, val)
    end
  end

  # The stage this is in.
  #
  # @return [Stage]
  def stage
    @stage ||= NullStage.new
  end
  def stage=(value)
    @stage = value
    @stage.entities << self unless @stage.entities.include? self
  end

  def game
    stage.game
  end

  # Position within the stage.
{'fraction_non_alphanumeric': 0.10186625194401244, 'fraction_numerical': 0.0, 'mean_word_length': 2.9722222222222223, 'pattern_counts': {'":': 0, '<': 7, '<?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': '306142', 'n_tokens_mistral': 404, 'n_tokens_neox': 392, 'n_words': 127}