///
/**
* A miniature linked list class.
* Useful for optimizing time-critical or highly repetitive tasks!
* See QuadTree for how to use it, IF YOU DARE.
*/
class LinkedList {
/**
* Creates a new link, and sets object and next to null.
*/
constructor() {
this.object = null;
this.next = null;
}
/**
* Stores a reference to an Basic.
*/
public object: Basic;
/**
* Stores a reference to the next link in the list.
*/
public next: LinkedList;
/**
* Clean up memory.
*/
public destroy() {
this.object = null;
if (this.next != null)
{
this.next.destroy();
}
this.next = null;
}
}