title: Why are the y axis frames to my roguelike not working?
body: <p>I am coding a roguelike, and am drawing each individual frame if the &quot;coordinates&quot; of the map are a certain number. Note: the indentation is correct in my project, it's just that stackoverflow is confusing. I made this code:</p>
  <pre><code>x = 0
  y = 0
  name = &quot;&quot;
  i = 0
  
  
  def lv1():
  global y
  global x
  while i == 0:
      print(&quot;\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n&quot;)
      if x == 0 and y == 0:
          print(&quot;@ - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 1 and y == 0:
          print(&quot;- - @ - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;a&quot;:
              x -= 1
          elif move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 2 and y == 0:
          print(&quot;- - - - @ - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;a&quot;:
              x -= 1
          elif move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 3 and y == 0:
          print(&quot;- - - - - - @ - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;a&quot;:
              x -= 1
          elif move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 4 and y == 0:
          print(&quot;- - - - - - - - @ - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;a&quot;:
              x -= 1
          elif move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 5 and y == 0:
          print(&quot;- - - - - - - - - - @&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;a&quot;:
              x -= 1
          elif move == &quot;s&quot;:
              y += 1
  
      elif x == 0 and y == 1:
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;@ - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
          elif move == &quot;w&quot;:
              y = 0
  
      elif x == 0 and y == 2:
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;@ - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;d&quot;:
              x += 1
          elif move == &quot;s&quot;:
              y += 1
          elif move == &quot;w&quot;:
              x -= 1
  
      elif y == 3 and x == 0:
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - []&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;- - - - - - - - - - -&quot;)
          print(&quot;@ - - - - - - - - - -&quot;)
          move = input(&quot;&quot;)
          if move == &quot;d&quot;:
              x += 1
          elif move == &quot;w&quot;:
              y -= 1
  
  
  lv1()
  </code></pre>
  <p>But for some reason, when I got down to y axis 2 and try to go back to y axis 1, It infinitely prints \n. Does anyone know what the problem</p>