<commit_before>require 'fileutils'
require 'erb'

class Delve

  def initialize(name)
    raise 'Cannot create a new roguelike without a name' unless name
    @name = name

    @renderers = [:curses]
    @generators = [:noise, :rogue, :cellular]
    @renderer = :curses
    @generator = :noise

    @statements = {
      :curses => {
        :renderer       => 'delve/renderer/curses',
        :input          => 'delve/input/curses',
        :new_renderer   => 'CursesRenderer.new',
        :new_input      => 'CursesInput.new'
      },
      :noise => {
        :generator      => 'delve/generator/noise',
        :new_generator  => 'NoiseGenerator.new(256, 128, :fine)'
      }
    }
  end

  def use_renderer(renderer)
    raise "Cannot use unknown renderer: #{renderer}" unless @renderers.include? renderer
    @renderer = renderer
  end

  def use_generator(generator)
    raise "Cannot use unknown generator: #{generator}" unless @generators.include? generator
    @generator = generator<commit_msg>Made the default generator rogue<commit_after>require 'fileutils'
require 'erb'

class Delve

  def initialize(name)
    raise 'Cannot create a new roguelike without a name' unless name
    @name = name

    @renderers = [:curses]
    @generators = [:noise, :rogue, :cellular]
    @renderer = :curses
    @generator = :rogue

    @statements = {
      :curses => {
        :renderer       => 'delve/renderer/curses',
        :input          => 'delve/input/curses',
        :new_renderer   => 'CursesRenderer.new',
        :new_input      => 'CursesInput.new'
      },
      :noise => {
        :generator      => 'delve/generator/noise',
        :new_generator  => 'NoiseGenerator.new(256, 128, :fine)'
      },
      :rogue => {
        :generator      => 'delve/generator/rogue',
        :new_generator  => 'RogueGenerator.new(256, 128)'
      }
    }
  end

  def use_renderer(renderer)
    raise "Cannot use unknown renderer: #{renderer}" unless @renderers.include? renderer
    @renderer = renderer
  end

  def use_generator(generator)
    raise "Cannot use unknown generator: #{generator}" unless @generators.include? generator
    @generator = generator
{'fraction_non_alphanumeric': 0.1231549815498155, 'fraction_numerical': 0.008302583025830259, 'mean_word_length': 2.6331658291457285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '5722953', 'n_tokens_mistral': 696, 'n_tokens_neox': 671, 'n_words': 167}