Re: Memorization

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 10/02/97


On Thu, 2 Oct 1997, Brian Williams - Nashak wrote:

-+I'm going to attempt to code spell memorization again, I know how I'm
-+going to go about doing it, and now that I know how to make linked lists,
-+I can try it again. What I'm wondering is where should I start? I mean, I
-+know to add the memorized_spells to char_data and stuff, but I'm trying to
-+figure out if I should make it like one 2-dimensional array, or what. Any
-+suggestions are welcomed, and those of you who are interested in the code,
-+I will be releasing a patch for it on my patch page, which is also not up
-+yet.

Why does it need to be a two dimensional array?  Besides, that'd limit
it by size, something you probably don't want if you want higher
"level" people able to memorize more spells than lower level people.
You want it dynamic, so I would suggest either using a dynamic array,
or a linked list.  If you're just storing the spell number of the
memorized spell, then it's as simple as an "int *memorized;" CREATE'd
and RECREATE'd as necessary.


--
Daniel Koepke -:- dkoepke@california.com -:-  [Shadowlord/Nether]
Think.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST