[Tutor] my newbie program
alan.gauld@bt.com
alan.gauld@bt.com
Tue Nov 19 04:00:02 2002
> > self.commandlist = ['look','n']
> >
> I think this won't work. there is no name self here. So better
> either delete the self. to create a class-variable
Oops. Yes that's what I intended!
> > while 1:
> > me.act()
> > if not map(lambda x: x != 0, me.location.exits):
> > break
> >
> >
> This is a little bit disturbing. Wasn't the original concept,
> that exits should be a four element list, containing exits
Dunno, I assumed it was just a list of exits with no numerical
restriction. I guess 4 makes sense tho'. Shouldn't change the
above tho' it still checks for a list of all zeros...
The real point was to do more than just call act() once!
Alan G.