Closed Rushwind13 closed 2 weeks ago
To be fair, the linked lists are "indexed" based on a MON_IDX / ITEM_IDX field, so by e.g. retrieving the ITEM_IDX_SHIELD
-th item in the list, you'll get back the correct item, no matter if it's 1st or 100th.
https://github.com/Rushwind13/JMoria/pull/84 makes it easier to find the correct index (if needed)
Given I have a Resource File And the first item in the file is a Longsword When I read the whole file Then the first item in the linked list is a Longsword
As of this writing, files are read in "backwards", with the last item in the file being index # 0 in the linked list.
Note: this is probably in linked list insertion, write tests and make it go!