From Jerry Coffin · 1996-04-10 16:23 · #73591 in EMULATE
In reply to Constructors by Brian Wisti
On (08 Apr 96) Brian Wisti wrote to All...
BW> <How to make an ungainly constructor look and/or function in a
BW> coherent manner>
Well, using private functions to carry out part of the construction
certainly seems like a valid approach to me. Another possibility is to
try to abstract parts of the characteristics of a world into other
classes. Without more specific information about the data you're
initializing in your ctor, it's a bit hard to say whether this is likely
to work well or not. One method that might work for this is to go by
the tables you're initializing, and starting with the assumption that
each of them probably represents a separate class of information.
One other item worth noting is that the tables used in many games are
each based on a mathematical formula or two. On a computer it's often
easier to figure out the formula instead of initializing the entire
table. If this is possible, it may reduce your ctors considerably.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
* Origin: Point Pointedly Pointless (1:128/77.3)