On Tue, 19 Oct 2010 19:49:20 -0400, Dave Angel wrote:

> Thanks, that is what I was trying to say.  In the same sense that
> emptying a list makes it quite small, if it's a general purpose object,
> you just want to remove all the attributes.
>
I think a 'place' (to generalise it) is quite a small object in any case. 
All it needs to contain is a few lists:
- a list of exits, which in some implementations might be simply
  references to other places, but might usefully be objects with
  two sides, each having an appearance and a link to the place 
  where that side appears.
- a list of fixed objects which only serve to describe the place.
- a list of mobile objects that actors can pick up and move
- a list of actors who happen to be there.

plus a describePlace() method and add(), remove() and getItem() methods 
for each list. It may be possible to use a single list for all types of 
object, in which case the object itself would be very small indeed.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to