bard-legends-framework 0.7.39 → 0.7.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
declare class DoublyLinkedListNode<T> {
|
|
2
|
-
value: T;
|
|
3
|
-
previous: DoublyLinkedListNode<T> | undefined;
|
|
4
|
-
next: DoublyLinkedListNode<T> | undefined;
|
|
5
|
-
constructor(value: T);
|
|
6
|
-
}
|
|
7
1
|
export declare class Queue<T> {
|
|
8
|
-
start
|
|
9
|
-
end
|
|
2
|
+
private start;
|
|
3
|
+
private end;
|
|
10
4
|
get isEmpty(): boolean;
|
|
11
5
|
constructor(firstNode?: T | undefined);
|
|
12
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @param args The values to add to end of the queue
|
|
8
|
+
*/
|
|
9
|
+
add(...args: T[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* @returns The value of the first element in the queue
|
|
12
|
+
*/
|
|
13
13
|
pop(): T | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* @returns The value of the first element in the queue without removing it
|
|
16
|
+
*/
|
|
14
17
|
peek(): T | undefined;
|
|
15
18
|
}
|
|
16
|
-
export {};
|
|
@@ -17,18 +17,26 @@ class Queue {
|
|
|
17
17
|
this.end = firstNodeInstance;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @param args The values to add to end of the queue
|
|
22
|
+
*/
|
|
23
|
+
add(...args) {
|
|
24
|
+
args.forEach(value => {
|
|
25
|
+
let newNode = new DoublyLinkedListNode(value);
|
|
26
|
+
if (this.start) {
|
|
27
|
+
newNode.previous = this.end;
|
|
28
|
+
this.end.next = newNode;
|
|
29
|
+
this.end = newNode;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.start = newNode;
|
|
33
|
+
this.end = newNode;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
31
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @returns The value of the first element in the queue
|
|
39
|
+
*/
|
|
32
40
|
pop() {
|
|
33
41
|
if (this.start) {
|
|
34
42
|
let value = this.start.value;
|
|
@@ -42,6 +50,9 @@ class Queue {
|
|
|
42
50
|
return value;
|
|
43
51
|
}
|
|
44
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* @returns The value of the first element in the queue without removing it
|
|
55
|
+
*/
|
|
45
56
|
peek() {
|
|
46
57
|
return this.start?.value;
|
|
47
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../../src/utilities/libraries/data-structures/queue/queue.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB;IAKxB,YAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,MAAa,KAAK;IAIhB,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;IAClC,CAAC;IAED,YAAY,SAAyB;QACnC,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,iBAAiB,GAAG,IAAI,oBAAoB,CAAC,SAAS,CAAC,CAAC;YAC5D,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC;YAC/B,IAAI,CAAC,GAAG,GAAG,iBAAiB,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../../src/utilities/libraries/data-structures/queue/queue.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB;IAKxB,YAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,MAAa,KAAK;IAIhB,IAAI,OAAO;Q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AAO,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC;IAC3B,CAAC;CACF;AAvDD,sBAuDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bard-legends-framework",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.41",
|
|
4
4
|
"description": "Bard Legends Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"actions-lib": "1.8.0",
|
|
39
|
-
"helpers-lib": "1.10.
|
|
39
|
+
"helpers-lib": "1.10.12",
|
|
40
40
|
"p2": "0.7.1",
|
|
41
41
|
"pixi.js": "7.4.2",
|
|
42
42
|
"reflect-metadata": "0.2.1"
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bard-legends-framework",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.41",
|
|
4
4
|
"description": "Bard Legends Framework",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"actions-lib": "1.8.0",
|
|
39
|
-
"helpers-lib": "1.10.
|
|
39
|
+
"helpers-lib": "1.10.12",
|
|
40
40
|
"p2": "0.7.1",
|
|
41
41
|
"pixi.js": "7.4.2",
|
|
42
42
|
"reflect-metadata": "0.2.1"
|