<commit_before>class Player
  
  attr_reader :health
  attr_accessor :name
  
  def initialize(name, health=100)
    @name = name.capitalize
    @health = health
  end
  
  def blam
    @health -= 10
    puts "#{@name} got blammed"
  end
  
  def w00t
    @health += 15
    puts "#{@name} got w00ted"
  end
  
  def name=(new_name)
    @name = new_name.capitalize
  end
  
  def score
    @health + @name.length
  end

  def to_s
    "I'm #{@name} with a health of #{@health} and a score of #{score}."
  end
  
end

player1 = Player.new("moe")
player2 = Player.new("larry", 60)
player3 = Player.new("curly", 125)

players = [player1, player2, player3]

puts "There are #{players.size} players in our game."

players.each do |player|
  puts player
end

players.each do |player|
  puts player.health
end

players.each do |player|
  player.w00t
  player.blam
  player.w00t
  puts player
end

players.pop
players.push Player.new "Schemp"
puts players<commit_msg>Adding a Game class to manage players and play<commit_after>class Game
  def initialize(title)
    @title = title
    @players = []
  end

  def add_player player
    @players << player
  end

  def play
    puts @players

    @players.each do |player|
      player.w00t
      player.blam
      player.blam
      puts player
    end
  end

end


class Player

  attr_reader :health
  attr_accessor :name

  def initialize(name, health=100)
    @name = name.capitalize
    @health = health
  end

  def blam
    @health -= 10
    puts "#{@name} got blammed"
  end

  def w00t
    @health += 15
    puts "#{@name} got w00ted"
  end

  def name=(new_name)
    @name = new_name.capitalize
  end

  def score
    @health + @name.length
  end

  def to_s
    "I'm #{@name} with a health of #{@health} and a score of #{score}."
  end

end

player1 = Player.new("moe")
player2 = Player.new("larry", 60)
player3 = Player.new("curly", 125)

knuckleheads = Game.new("Knuckleheads")
knuckleheads.add_player(player1)
knuckleheads.add_player(player2)
knuckleheads.add_player(player3)
knuckleheads.play

{'fraction_non_alphanumeric': 0.10703812316715543, 'fraction_numerical': 0.024437927663734114, 'mean_word_length': 2.9365384615384613, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1250169', 'n_tokens_mistral': 800, 'n_tokens_neox': 753, 'n_words': 213}