<span style>I am learning Python using the </span><a href="http://learnpythonthehardway.org/" target="_blank" style>&quot;Learn Python the Hard Way&quot; book by Zed Shaw</a><span style>.  I reached </span><a href="http://learnpythonthehardway.org/book/ex42.html" target="_blank" style>exercise 42 where we learn about Python classes</a><span style>.  The exercise shows a game with one class that includes all the definitions for playing the game.  For extra credit we are asked to create another version of this game where we use two classes - one for the room definitions and the other for the playing the game.</span><div>
<br></div><div><font color="#222222" face="arial, sans-serif">May attempt at creating two classes is here </font><a href="http://codepad.org/963vUgSt" target="_blank">http://codepad.org/963vUgSt</a> .  I get the following error which I have been un-able to resolve.  Any suggestions are welcome.<div>
<br>Traceback (most recent call last):<br>  File &quot;ex42_3.py&quot;, line 233, in &lt;module&gt;<br>    run()<br>  File &quot;ex42_3.py&quot;, line 231, in run<br>
    room1.doIt()          # plays the game<br>  File &quot;ex42_3.py&quot;, line 32, in doIt<br>    self.obj.play() # use object<br>  File &quot;ex42_3.py&quot;, line 20, in play<br>    room = getattr(self, next)<br>AttributeError: &#39;Engine&#39; object has no attribute &#39;central_corridor&#39;<br>

<br>Tonu
</div></div>