|
@@ -131,6 +131,13 @@ function ParseSourceDestinationRange(lineNumber: number, almanac: string[]): Map
|
|
|
return rangeMap;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ * Find an IdentifiableObject by its ID number
|
|
|
+ *
|
|
|
+ * @param needle The ID number to find
|
|
|
+ * @param haystack The list to find the ID in
|
|
|
+ * @returns {IdentifiableObject|undefined} The object by that ID if found, or undefined
|
|
|
+ */
|
|
|
function FindObjectByID(needle: number, haystack: IdentifiableObject[]): IdentifiableObject|undefined {
|
|
|
return haystack.find((obj) => obj.ID == needle);
|
|
|
}
|