stop person moving through walls using Python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3756940/stop-moving-through-wall-in-maze-using-python">stop moving through wall in maze using Python</a>  </p>
</blockquote>



<p>How can I do this using Python 3.1: use the current cell, check if there is a wall to the right, left, up, down etc.</p>

<p>This is my code for moving:</p>

<pre><code>if event.keysym == 'Right':
    print( 'moving to the right', c)
    c.move(CELLSIZE,0)
</code></pre>

<p>I tried this code to stop moving but it doesn't work:</p>

<pre><code>    if event.keysym == 'Wall':
        curcell.right = True
</code></pre>
