[Script] LinkedList
The following script is a small helper that can be useful when you deal with lists or arrays and change the content often. It implements a super simple linked list.
This is a very simple script and some of you may already have a similar utility script. But it appeared that I use this script already very frequently in my scripts and I want to post some other scripts here soon that requires this script.
It is maybe also good to explain the concept of a linked list to beginners.
Features:
- Can be a bit faster than the use of array in some situations ( ie: queues, deleting of many random elements )
- Changing the content of the list while iterating over it is easier/safer, compared to a solution using an array
Usage: see script

Note: This is tested in TurboSphere. I am not sure if Sphere1.5 supports the null keyword... but if not it is maybe easy to emulate^^