<commit_before># Manages entities.
class Yeah::Game
  attr_accessor :entities, :screen, :platform, :resolution

  def initialize
    @resolution = Vector[320, 180]
    @screen = Surface.new(@resolution)
    @platform = Desktop.new
    @entities = []
  end

  def update
    @entities.each { |e| e.update }
  end

  def draw
    screen.fill(Color[0, 0, 0, 0])
    @entities.each do |entity|
      surface = entity.draw
      screen.draw(surface, entity.position) unless surface.nil?
    end
    platform.render(screen)
  end

  def start
    platform.each_tick do
      update
      draw
      break if @stopped
    end
  end

  def stop
    @stopped = true
  end
end<commit_msg>game access control<commit_after># Manages entities.
class Yeah::Game
  attr_accessor :entities, :screen, :platform, :resolution

  def initialize
    @resolution = Vector[320, 180]
    @screen = Surface.new(@resolution)
    @platform = Desktop.new
    @entities = []
  end

  def start
    platform.each_tick do
      update
      draw
      break if @stopped
    end
  end

  def stop
    @stopped = true
  end

  protected

  def update
    @entities.each { |e| e.update }
  end

  def draw
    screen.fill(Color[0, 0, 0, 0])
    @entities.each do |entity|
      surface = entity.draw
      screen.draw(surface, entity.position) unless surface.nil?
    end
    platform.render(screen)
  end
end
{'fraction_non_alphanumeric': 0.09745454545454546, 'fraction_numerical': 0.014545454545454545, 'mean_word_length': 2.5926892950391647, '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': '1305737', 'n_tokens_mistral': 471, 'n_tokens_neox': 441, 'n_words': 126}