title: Python (3.3): UnboundLocalError: local variable referenced before assignment
body: <p>Whenever I start my game and let's say for example I enter 1,4 as the grid reference it will reply with </p>
  
  <blockquote>
    <p>"UnboundLocalError: local variable 'of' referenced before assignment"</p>
  </blockquote>
  
  <p>How can I fix this?</p>
  
  <p>Code (edited to for brevity):    </p>
  
  <pre><code>import time
  while 1==1:
      cont=1
      while cont==1:
  
          of="-"
          tf="-"
          rf="-"
          ov="-"
          tv="-"
          rv="-"
          os="-"
          ts="-"
          rs="-"
          go=1
  ...
  </code></pre>