Re: how do I make an Object be in the player's inventory at start of game??


4 Dec 1995 21:32:50 GMT

bonni mierzejewska mentioned in rec.arts.int-fiction that::
> On Fri, 01 Dec 1995 04:48:59 GMT, demon@ih2000.net (Demon) wrote:

> [this was posted to rec.games.int-fiction, but it clearly belongs here]

> Surely one doesn't need to declare a Class JellyBaby and enumerate each and
> every jelly baby (all 30 of them!)? My husband, the systems programming guru,
> doesn't think that would be so very inelegant, but what if the bag contains 75
> objects, or 100? It gets rather unwieldy. Surely there's an elegant solution
> to this?

Unless you have dynamic object creation capabilities at runtime (like TADS
does), you must enumerate every jellybaby - what if I wander around and
want to put a jellybaby in each room I visit?

You would even have to have sub-classes of jelly babies for babies of
different color...

----------------------------------------------------------------------------
John Holder (jholder@nmsu.edu) "Verbing weirds language." - Calvin
Homepage: http://speedracer.nmsu.edu/~jholder
Topics: Homebrewing | Raytracing | Interactive Fiction | Fractals
----------------------------------------------------------------------------