TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: RICHARD VETO
from: KURT KUZBA
date: 1998-04-02 05:51:00
subject: Programming

RV>   How do I link all those structures to reflect in the
RV>   player inventory?  Do I use a union?
   You could, if the player is to have multiple instances of
   some objects. An object list would need to know what type of
   object is being stored, though. An equipment list, on the
   other hand, should be coded into the player object, and
   include the possibility of absence of individual items of
   equipment, such as no shield, or no wands. A list of each
   individual item type coded into the character object may
   serve you better and be simpler to handle.
   I gravitate toward making an object type, such as weapon,
   and having its attributes change according to type.
   Then you can have lists of like-type objects and limit the
   extent of associated confusion. The objects may be derived
   from a base class.
> ] You're trying to make me paranoid, but I'm on to your tricks
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.