Re: "create" command, passing creature type to ecosystem


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]

Posted by Daniel Longest on April 21, 2001 at 21:00:05:

In Reply to: "create" command, passing creature type to ecosystem posted by Naveed on April 21, 2001 at 20:01:09:

You can use explicit functions in the class (like add_browser, add_bush, etc). You could allocate an instance of the concrete class via newand pass that in. You could use the virtual constructor idiom. See http://www.parashift.com/cpp-faq-lite/

Daniel

: Are we allowed to pass the type of a creature from the manager to the ecosystem when we create a creature? How else would the ecosystem know what kind of creature to create?




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2704 Web Discussion Board ] [ FAQ ]