<commit_before>class Draft < ActiveRecord::Base
  belongs_to :league
  has_many :available_tokens
  has_many :tokens, through: :available_tokens
  has_many :snake_positions
  has_many :users, through: :snake_positions

  def generate_soldiers
    @league = League.find(self.league_id)
    @league.memberships.length.times do
      8.times do
        token = Token.new
        unit = Unit.new
        soldier = Soldier.new
        soldier.set_starting_attributes
        unit.soldiers << soldier
        token.units << unit
        self.tokens << token
      end
    end
  end

  def generate_draft_order
    @league = League.find(self.league_id)
    @members = @league.users.shuffle
<commit_msg>8 soldiers each in first draft, 4 each afterwards<commit_after>class Draft < ActiveRecord::Base
  belongs_to :league
  has_many :available_tokens
  has_many :tokens, through: :available_tokens
  has_many :snake_positions
  has_many :users, through: :snake_positions

  def generate_soldiers
    @league = League.find(self.league_id)

    number_of_tokens = 4
    number_of_tokens = 8 if self.season == 1

    @league.memberships.length.times do
      number_of_tokens.times do
        token = Token.new
        unit = Unit.new
        soldier = Soldier.new
        soldier.set_starting_attributes
        unit.soldiers << soldier
        token.units << unit
        self.tokens << token
      end
    end
  end

  def generate_draft_order
    @league = League.find(self.league_id)
    @members = @league.users.shuffle

{'fraction_non_alphanumeric': 0.07666886979510905, 'fraction_numerical': 0.0039656311962987445, 'mean_word_length': 2.882051282051282, 'pattern_counts': {'":': 0, '<': 17, '<?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': '7205464', 'n_tokens_mistral': 492, 'n_tokens_neox': 459, 'n_words': 109}