Re: Data structure for movements?


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

Posted by Jim Helms on April 17, 2001 at 12:43:40:

In Reply to: Data structure for movements? posted by Carl Cospel on April 15, 2001 at 23:29:35:

: Are the movements supposed to be stored outside of the specific creatures class? Can anybody reword this for me? Thanx

No, the movements should be stored somwhere within the inheritance hierarchy (you have to figure out where :). You should use a data structure to hold the movements and execute them in the proper order. The easiest way is to use a queue, so that you can pop of the next move, do it, the push it back onto the end of the queue. This will cycle automatically for you.

--Jim




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 ]