title: Ruby Variables not working
body: <p>I am having trouble incrementing a variable. This seems very trivial and easy but for some reason I can't get it to work. </p>
  
  <p>I have a program moving a robot about a grid and it's fully working. I would now just like to count how many moves he makes.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>Class Robot
  
   @counter = 0
   def move
    @counter +=1
   end
  
   def print
    puts "Hurray the Markov chain has worked in #{@counter}"
   end
  </code></pre>
  
  <p>I get an error saying undefined method '+' operator. I have also tried </p>
  
  <pre><code>@counter = @counter + 1
  </code></pre>
  
  <p>What am I doing wrong?</p>