<commit_before>require './lib/stattr.rb'
include Stattr

Technoir = Game


class Technoir

  def self.stats
    ["coax","fight","detect","hack", "move", "operate", "prowl", "shoot", "treat"]
  end

  def self.make_stat(val)
    Stat.new(val)
  end
  def self.training_programs
    [
    TrainingProgram.new('Bodyguard', 'coax', 'fight', 'treat'),
    TrainingProgram.new('Courier', 'fight', 'move', 'prowl'),
    TrainingProgram.new('Criminal', 'hack', 'prowl', 'shoot'),
    TrainingProgram.new('Bodyguard', 'coax', 'fight', 'treat'),
    TrainingProgram.new('Doctor', 'detect', 'operate', 'treat'),
    TrainingProgram.new('Engineer', 'coax', 'hack', 'operate'),
    TrainingProgram.new('Escort', 'coax', 'move', 'treat'),
    TrainingProgram.new('Investigator', 'detect', 'hack', 'prowl'),
    TrainingProgram.new('Pilot', 'detect', 'operate', 'shoot'),
    TrainingProgram.new('Soldier', 'fight', 'move', 'shoot'),
    ]

# Remember this part for later
# Technoir.training_programs.detect { |p| p.name == "Bodyguard" }
  end
end

class StatList
  attr_accessor *Technoir.stats
  def initialize(val=1, list)
    Technoir.stats.each  { |s| 
      if list.include?(s)
        instance_variable_set("@#{s}", Technoir.make_stat(val + list.count(s)))
      else
        instance_variable_set("@#{s}", Technoir.make_stat(val))
      end
    }
  end
end

class Push < DiceRoll
end


class CharacterSheet

  attr_accessor :push, :verbs, :programs, :adj

  def initialize (name, tp1, tp2, tp3, *adj)
    @push = 2
    @adj = adj.map { |a| PosAdj.new(a, true, 0)}
    @programs = [tp1, tp2, tp3]
    list = self.programs.map { |p| p.verbs}.flatten
    @verbs = StatList.new(1, list)
  end

  def use_push(r)
    self.push -= 1
    r.push += 1
  end
end

#class Stat

  #def initialize(value)
    #@val = value
  #end
#end

class TrainingProgram

  attr_accessor :name, :verbs
    def initialize(name, verb1, verb2, verb3)
      @name = name
      @verbs = [verb1, verb2, verb3]
    end

end

class Adjective
  attr_accessor :name, :positive, :status
end

class NegAdj < Adjective
  def initialize(name, positive = neg, status=0)
    @name = name
    @positive = positive
    @status = status
  end
end
class PosAdj < Adjective
  def initialize(name, positive = true,status=0)
    @name = name
    @positive = positive
    @status = status
  end
end<commit_msg>Now uses models instead of alias<commit_after>require './lib/stattr.rb'

module Technoir
  include Stattr

  class System
    @stats = ["coax","fight","detect","hack", "move", "operate", "prowl", "shoot", "treat"]

    def self.make_stat(val)
      Stat.new(val)
    end
    def self.training_programs
      [
      TrainingProgram.new('Bodyguard', 'coax', 'fight', 'treat'),
      TrainingProgram.new('Courier', 'fight', 'move', 'prowl'),
      TrainingProgram.new('Criminal', 'hack', 'prowl', 'shoot'),
      TrainingProgram.new('Bodyguard', 'coax', 'fight', 'treat'),
      TrainingProgram.new('Doctor', 'detect', 'operate', 'treat'),
      TrainingProgram.new('Engineer', 'coax', 'hack', 'operate'),
      TrainingProgram.new('Escort', 'coax', 'move', 'treat'),
      TrainingProgram.new('Investigator', 'detect', 'hack', 'prowl'),
      TrainingProgram.new('Pilot', 'detect', 'operate', 'shoot'),
      TrainingProgram.new('Soldier', 'fight', 'move', 'shoot'),
      ]

    end
  end

  class StatList
    attr_accessor *System.stats
    def initialize(val=1, list)
      System.stats.each  { |s|
        if list.include?(s)
          instance_variable_set("@#{s}", System.make_stat(val + list.count(s)))
        else
          instance_variable_set("@#{s}", System.make_stat(val))
        end
      }
    end
  end

  class Push < DiceRoll
  end


  class CharacterSheet

    attr_accessor :push, :verbs, :programs, :adj

    def initialize (name, tp1, tp2, tp3, *adj)
      @push = 2
      @adj = adj.map { |a| PosAdj.new(a, true, 0)}
      @programs = [tp1, tp2, tp3]
      list = self.programs.map { |p| p.verbs}.flatten
      @verbs = StatList.new(1, list)
    end

    def use_push(r)
      self.push -= 1
      r.push += 1
    end
  end


  class TrainingProgram

    attr_accessor :name, :verbs
      def initialize(name, verb1, verb2, verb3)
        @name = name
        @verbs = [verb1, verb2, verb3]
      end

  end

  class Adjective
    attr_accessor :name, :positive, :status
  end

  class NegAdj < Adjective
    def initialize(name, positive = neg, status=0)
      @name = name
      @positive = positive
      @status = status
    end
  end
  class PosAdj < Adjective
    def initialize(name, positive = true,status=0)
      @name = name
      @positive = positive
      @status = status
    end
  end
end
{'fraction_non_alphanumeric': 0.15295876949369794, 'fraction_numerical': 0.008545182653279214, 'mean_word_length': 3.1214788732394365, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2437273', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1623, 'n_words': 394}