title: Uninitialized Constant error
body: <p>When I run the following code I'm getting an error that reads "fig_match:rb:5:in '': uninitialized constant Match::Fig (NameError) from fig_match.rb:4:in"</p>
  
  <p>I was in the midst of testing my setup and battle methods, which is why I have the setup and match calls after my variable setters in the Match class. </p>
  
  <pre><code>require_relative = 'fig_user.rb' #class name is Fig within fig_user.rb
  
  class Match
      fig1 = Fig.new
      fig2 = Fig.new
      go = 0
      winner = nil
  
      setup(Bob, Sam)
      match.battle
  
      def setup(name1, name2)
      #set names
      @name1 = fig1.name
      @name2 = fig2.name
  
      go = rand(2)
      end
  
  
      def battle
          if go.even?
          p fig1.name
  
          end
      end 
  </code></pre>
  
  <p>end</p>
  
  <p>This is the separate class that's being referenced in the above code (not sure if it matters)</p>
  
  <pre><code>class Fig 
  
  attr_reader :name, :power, :health
  attr_accessor :name, :power, :health
  
  deckId = @id 
  name = @name 
  power = @power
  moves = Hash["Kick", 50, "Punch", 30]
  health = 100
  end
  </code></pre>