puzzle-lib 1.6.0 → 1.7.0
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.
- package/build/src/Braille/BrailleCharacter.d.ts +15 -15
- package/build/src/Braille/BrailleCharacter.js +39 -38
- package/build/src/Braille/BrailleCharacter.js.map +1 -1
- package/build/src/Braille/BrailleData.d.ts +6 -6
- package/build/src/Braille/BrailleData.js +65 -65
- package/build/src/Braille/BrailleData.js.map +1 -1
- package/build/src/Braille/BrailleDot.d.ts +9 -9
- package/build/src/Braille/BrailleDot.js +13 -13
- package/build/src/Braille/BrailleDot.js.map +1 -1
- package/build/src/Braille/BrailleEncoding.d.ts +54 -54
- package/build/src/Braille/BrailleEncoding.js +66 -65
- package/build/src/Braille/BrailleEncoding.js.map +1 -1
- package/build/src/Braille/BrailleStream.d.ts +18 -18
- package/build/src/Braille/BrailleStream.js +75 -75
- package/build/src/Braille/BrailleStream.js.map +1 -1
- package/build/src/Cipher/AutoKeyString.d.ts +4 -4
- package/build/src/Cipher/AutoKeyString.js +34 -34
- package/build/src/Cipher/CaesarString.d.ts +8 -8
- package/build/src/Cipher/CaesarString.js +32 -31
- package/build/src/Cipher/CaesarString.js.map +1 -1
- package/build/src/Cipher/CaesarUtils.d.ts +13 -13
- package/build/src/Cipher/CaesarUtils.js +57 -57
- package/build/src/Cipher/CaesarUtils.js.map +1 -1
- package/build/src/Cipher/KeyedCipherStringBase.d.ts +12 -12
- package/build/src/Cipher/KeyedCipherStringBase.js +30 -28
- package/build/src/Cipher/KeyedCipherStringBase.js.map +1 -1
- package/build/src/Cipher/VigenereString.d.ts +4 -4
- package/build/src/Cipher/VigenereString.js +21 -21
- package/build/src/Common/CharacterImage.d.ts +6 -6
- package/build/src/Common/CharacterImage.js +12 -10
- package/build/src/Common/CharacterImage.js.map +1 -1
- package/build/src/Common/EncodingCategory.d.ts +8 -8
- package/build/src/Common/EncodingCategory.js +12 -12
- package/build/src/Common/EncodingCategory.js.map +1 -1
- package/build/src/Common/EncodingCharacterBase.d.ts +23 -23
- package/build/src/Common/EncodingCharacterBase.js +54 -52
- package/build/src/Common/EncodingCharacterBase.js.map +1 -1
- package/build/src/Common/EncodingDataBase.d.ts +7 -7
- package/build/src/Common/EncodingDataBase.js +27 -29
- package/build/src/Common/EncodingDataBase.js.map +1 -1
- package/build/src/Common/EncodingEntry.d.ts +8 -8
- package/build/src/Common/EncodingEntry.js +17 -14
- package/build/src/Common/EncodingEntry.js.map +1 -1
- package/build/src/Common/EncodingLookupResult.d.ts +6 -6
- package/build/src/Common/EncodingLookupResult.js +11 -13
- package/build/src/Common/EncodingLookupResult.js.map +1 -1
- package/build/src/Common/Helpers.d.ts +4 -4
- package/build/src/Common/Helpers.js +16 -16
- package/build/src/Common/InlineSvg.d.ts +7 -7
- package/build/src/Common/InlineSvg.js +17 -14
- package/build/src/Common/InlineSvg.js.map +1 -1
- package/build/src/Conversion/CharacterAutoConvert.d.ts +10 -10
- package/build/src/Conversion/CharacterAutoConvert.js +88 -88
- package/build/src/Conversion/CharacterAutoConvert.js.map +1 -1
- package/build/src/Conversion/CharacterConversion.d.ts +8 -8
- package/build/src/Conversion/CharacterConversion.js +50 -50
- package/build/src/Conversion/CharacterEncoding.d.ts +9 -9
- package/build/src/Conversion/CharacterEncoding.js +13 -13
- package/build/src/Conversion/CharacterEncoding.js.map +1 -1
- package/build/src/Conversion/CharacterTableEntry.d.ts +10 -10
- package/build/src/Conversion/CharacterTableEntry.js +25 -19
- package/build/src/Conversion/CharacterTableEntry.js.map +1 -1
- package/build/src/Conversion/SignificantFigures.d.ts +7 -7
- package/build/src/Conversion/SignificantFigures.js +50 -50
- package/build/src/Conversion/StringAutoConvert.d.ts +6 -6
- package/build/src/Conversion/StringAutoConvert.js +46 -46
- package/build/src/Morse/MorseCharacter.d.ts +22 -22
- package/build/src/Morse/MorseCharacter.js +97 -96
- package/build/src/Morse/MorseCharacter.js.map +1 -1
- package/build/src/Morse/MorseData.d.ts +6 -6
- package/build/src/Morse/MorseData.js +70 -70
- package/build/src/Morse/MorseData.js.map +1 -1
- package/build/src/Morse/MorseEncoding.d.ts +59 -59
- package/build/src/Morse/MorseEncoding.js +94 -94
- package/build/src/Morse/MorseEncoding.js.map +1 -1
- package/build/src/Morse/MorseString.d.ts +10 -10
- package/build/src/Morse/MorseString.js +67 -66
- package/build/src/Morse/MorseString.js.map +1 -1
- package/build/src/Nato/NatoCharacter.d.ts +5 -5
- package/build/src/Nato/NatoCharacter.js +12 -10
- package/build/src/Nato/NatoCharacter.js.map +1 -1
- package/build/src/Nato/NatoData.d.ts +7 -7
- package/build/src/Nato/NatoData.js +49 -51
- package/build/src/Nato/NatoData.js.map +1 -1
- package/build/src/NavalFlags/NavalFlags.d.ts +7 -7
- package/build/src/NavalFlags/NavalFlags.js +75 -77
- package/build/src/NavalFlags/NavalFlags.js.map +1 -1
- package/build/src/Resistor/Resistor.d.ts +24 -24
- package/build/src/Resistor/Resistor.js +86 -86
- package/build/src/Resistor/Resistor.js.map +1 -1
- package/build/src/Resistor/ResistorColorEntry.d.ts +12 -12
- package/build/src/Resistor/ResistorColorEntry.js +36 -31
- package/build/src/Resistor/ResistorColorEntry.js.map +1 -1
- package/build/src/Semaphore/SemaphoreCharacter.d.ts +20 -20
- package/build/src/Semaphore/SemaphoreCharacter.js +75 -75
- package/build/src/Semaphore/SemaphoreCharacter.js.map +1 -1
- package/build/src/Semaphore/SemaphoreData.d.ts +6 -6
- package/build/src/Semaphore/SemaphoreData.js +53 -53
- package/build/src/Semaphore/SemaphoreData.js.map +1 -1
- package/build/src/Semaphore/SemaphoreDegrees.d.ts +5 -5
- package/build/src/Semaphore/SemaphoreDegrees.js +26 -26
- package/build/src/Semaphore/SemaphoreDirection.d.ts +11 -11
- package/build/src/Semaphore/SemaphoreDirection.js +15 -15
- package/build/src/Semaphore/SemaphoreDirection.js.map +1 -1
- package/build/src/Semaphore/SemaphoreEncoding.d.ts +40 -40
- package/build/src/Semaphore/SemaphoreEncoding.js +48 -47
- package/build/src/Semaphore/SemaphoreEncoding.js.map +1 -1
- package/build/src/Semaphore/SemaphoreStream.d.ts +17 -17
- package/build/src/Semaphore/SemaphoreStream.js +73 -72
- package/build/src/Semaphore/SemaphoreStream.js.map +1 -1
- package/build/src/WordSearch/Point.d.ts +4 -4
- package/build/src/WordSearch/Point.js +2 -2
- package/build/src/WordSearch/Result.d.ts +6 -6
- package/build/src/WordSearch/Result.js +12 -10
- package/build/src/WordSearch/Result.js.map +1 -1
- package/build/src/WordSearch/WordSearchDirection.d.ts +6 -6
- package/build/src/WordSearch/WordSearchDirection.js +10 -10
- package/build/src/WordSearch/WordSearchDirection.js.map +1 -1
- package/build/src/WordSearch/WordSearchSolver.d.ts +27 -27
- package/build/src/WordSearch/WordSearchSolver.js +232 -222
- package/build/src/WordSearch/WordSearchSolver.js.map +1 -1
- package/build/src/index.d.ts +35 -35
- package/build/src/index.js +72 -72
- package/package.json +5 -5
- package/src/Braille/BrailleCharacter.ts +1 -1
- package/src/Braille/BrailleData.ts +16 -16
- package/src/Cipher/AutoKeyString.ts +1 -1
- package/src/Cipher/CaesarUtils.ts +1 -1
- package/src/Cipher/VigenereString.ts +1 -1
- package/src/Common/EncodingDataBase.ts +1 -1
- package/src/Conversion/CharacterAutoConvert.ts +1 -1
- package/src/Conversion/CharacterConversion.ts +5 -5
- package/src/Conversion/SignificantFigures.ts +1 -1
- package/src/Conversion/StringAutoConvert.ts +2 -2
- package/src/Morse/MorseData.ts +18 -18
- package/src/Morse/MorseString.ts +12 -12
- package/src/Nato/NatoData.ts +1 -1
- package/src/NavalFlags/NavalFlags.ts +52 -52
- package/src/Resistor/Resistor.ts +9 -9
- package/src/Resistor/ResistorColorEntry.ts +1 -1
- package/src/Semaphore/SemaphoreCharacter.ts +5 -5
- package/src/Semaphore/SemaphoreData.ts +1 -1
- package/src/WordSearch/WordSearchSolver.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resistor.js","sourceRoot":"","sources":["../../../src/Resistor/Resistor.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAExD,MAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"Resistor.js","sourceRoot":"","sources":["../../../src/Resistor/Resistor.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAExD,MAAa,QAAQ;IACnB,4CAA4C;IAC5C,MAAM,CAAU,KAAK,GAAG,IAAI,uCAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACzE,MAAM,CAAU,KAAK,GAAG,IAAI,uCAAkB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,MAAM,CAAU,GAAG,GAAG,IAAI,uCAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1E,MAAM,CAAU,MAAM,GAAG,IAAI,uCAAkB,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9E,MAAM,CAAU,MAAM,GAAG,IAAI,uCAAkB,CAC7C,QAAQ,EACR,SAAS,EACT,KAAK,EACL,CAAC,CACF,CAAC;IACF,MAAM,CAAU,KAAK,GAAG,IAAI,uCAAkB,CAC5C,OAAO,EACP,SAAS,EACT,MAAM,EACN,CAAC,EACD,GAAG,CACJ,CAAC;IACF,MAAM,CAAU,IAAI,GAAG,IAAI,uCAAkB,CAC3C,MAAM,EACN,SAAS,EACT,OAAO,EACP,CAAC,EACD,IAAI,CACL,CAAC;IACF,MAAM,CAAU,MAAM,GAAG,IAAI,uCAAkB,CAC7C,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,CAAC,EACD,GAAG,CACJ,CAAC;IACF,MAAM,CAAU,IAAI,GAAG,IAAI,uCAAkB,CAC3C,MAAM,EACN,SAAS,EACT,SAAS,EACT,CAAC,CACF,CAAC;IACF,MAAM,CAAU,KAAK,GA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AAC,gBAAgB,CAAC;aAClC;YAED,KAAK,IAAI,EAAE,CAAC;YACZ,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC;SAC7B;QAED,OAAO,QAAQ,CAAC,eAAe,CAC7B,KAAK,EACL,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,UAAU,CACrC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,IAAI,KAAK,IAAI,UAAU,EAAE;YACvB,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC;SACjC;aAAM,IAAI,KAAK,IAAI,OAAO,EAAE;YAC3B,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,CAAC;SAC9B;aAAM,IAAI,KAAK,IAAI,IAAI,EAAE;YACxB,OAAO,GAAG,KAAK,GAAG,IAAI,GAAG,CAAC;SAC3B;aAAM;YACL,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;SACzB;IACH,CAAC;IAEO,MAAM,CAAC,eAAe,CAAC,KAAa,EAAE,SAAiB;QAC7D,IAAI,SAAS,IAAI,CAAC,EAAE;YAClB,OAAO,KAAK,GAAG,SAAS,CAAC;SAC1B;aAAM,IAAI,SAAS,GAAG,CAAC,EAAE;YACxB,6CAA6C;YAC7C,OAAO,KAAK,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;SAChC;aAAM;YACL,MAAM,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC;SAC5C;IACH,CAAC;;AAnIH,4BAoIC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare class ResistorColorEntry {
|
|
2
|
-
readonly name: string;
|
|
3
|
-
readonly colorCode: string;
|
|
4
|
-
readonly multiplier: number;
|
|
5
|
-
readonly value?: number;
|
|
6
|
-
readonly toleranceInPercent?: number;
|
|
7
|
-
constructor(name: string, colorCode: string, multiplier: number, value?: number, toleranceInPercent?: number);
|
|
8
|
-
hasValue(): boolean;
|
|
9
|
-
getDisplayValue(): string;
|
|
10
|
-
hasTolerance(): boolean;
|
|
11
|
-
getDisplayTolerance(): string;
|
|
12
|
-
}
|
|
1
|
+
export declare class ResistorColorEntry {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly colorCode: string;
|
|
4
|
+
readonly multiplier: number;
|
|
5
|
+
readonly value?: number;
|
|
6
|
+
readonly toleranceInPercent?: number;
|
|
7
|
+
constructor(name: string, colorCode: string, multiplier: number, value?: number, toleranceInPercent?: number);
|
|
8
|
+
hasValue(): boolean;
|
|
9
|
+
getDisplayValue(): string;
|
|
10
|
+
hasTolerance(): boolean;
|
|
11
|
+
getDisplayTolerance(): string;
|
|
12
|
+
}
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResistorColorEntry = void 0;
|
|
4
|
-
class ResistorColorEntry {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResistorColorEntry = void 0;
|
|
4
|
+
class ResistorColorEntry {
|
|
5
|
+
name;
|
|
6
|
+
colorCode;
|
|
7
|
+
multiplier;
|
|
8
|
+
value;
|
|
9
|
+
toleranceInPercent;
|
|
10
|
+
constructor(name, colorCode, multiplier, value, toleranceInPercent) {
|
|
11
|
+
this.name = name;
|
|
12
|
+
this.value = value;
|
|
13
|
+
this.colorCode = colorCode;
|
|
14
|
+
this.multiplier = multiplier;
|
|
15
|
+
this.toleranceInPercent = toleranceInPercent;
|
|
16
|
+
}
|
|
17
|
+
hasValue() {
|
|
18
|
+
return this.value !== undefined;
|
|
19
|
+
}
|
|
20
|
+
getDisplayValue() {
|
|
21
|
+
if (this.value === undefined) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
return this.value.toString();
|
|
25
|
+
}
|
|
26
|
+
hasTolerance() {
|
|
27
|
+
return this.toleranceInPercent !== undefined;
|
|
28
|
+
}
|
|
29
|
+
getDisplayTolerance() {
|
|
30
|
+
if (this.toleranceInPercent === undefined) {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
return `${this.toleranceInPercent}%`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ResistorColorEntry = ResistorColorEntry;
|
|
32
37
|
//# sourceMappingURL=ResistorColorEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResistorColorEntry.js","sourceRoot":"","sources":["../../../src/Resistor/ResistorColorEntry.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;
|
|
1
|
+
{"version":3,"file":"ResistorColorEntry.js","sourceRoot":"","sources":["../../../src/Resistor/ResistorColorEntry.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IACpB,IAAI,CAAS;IACb,SAAS,CAAS;IAClB,UAAU,CAAS;IACnB,KAAK,CAAU;IACf,kBAAkB,CAAU;IAErC,YACE,IAAY,EACZ,SAAiB,EACjB,UAAkB,EAClB,KAAc,EACd,kBAA2B;QAE3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC/C,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;IAClC,CAAC;IAED,eAAe;QACb,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;YAC5B,OAAO,EAAE,CAAC;SACX;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,kBAAkB,KAAK,SAAS,CAAC;IAC/C,CAAC;IAED,mBAAmB;QACjB,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE;YACzC,OAAO,EAAE,CAAC;SACX;QACD,OAAO,GAAG,IAAI,CAAC,kBAAkB,GAAG,CAAC;IACvC,CAAC;CACF;AA1CD,gDA0CC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { EncodingCategory } from '../Common/EncodingCategory';
|
|
2
|
-
import { EncodingCharacterBase } from '../Common/EncodingCharacterBase';
|
|
3
|
-
import { EncodingEntry } from '../Common/EncodingEntry';
|
|
4
|
-
import { SemaphoreDirection } from './SemaphoreDirection';
|
|
5
|
-
import { SemaphoreEncoding } from './SemaphoreEncoding';
|
|
6
|
-
export declare class SemaphoreCharacter extends EncodingCharacterBase<SemaphoreEncoding> {
|
|
7
|
-
private static parseEncoding;
|
|
8
|
-
private _directions;
|
|
9
|
-
constructor(encoding?: SemaphoreEncoding, category?: EncodingCategory);
|
|
10
|
-
get directions(): SemaphoreDirection[];
|
|
11
|
-
set directions(value: SemaphoreDirection[]);
|
|
12
|
-
addDirection(direction: SemaphoreDirection | SemaphoreEncoding): void;
|
|
13
|
-
removeDirection(direction: SemaphoreDirection | SemaphoreEncoding): void;
|
|
14
|
-
hasDirection(direction: SemaphoreDirection): boolean;
|
|
15
|
-
getDegrees(): number[];
|
|
16
|
-
getPotentialMatch(other: SemaphoreDirection): EncodingEntry<SemaphoreEncoding> | null;
|
|
17
|
-
protected onClear(): void;
|
|
18
|
-
protected onEmpty(): boolean;
|
|
19
|
-
protected getEncoding(): SemaphoreEncoding;
|
|
20
|
-
}
|
|
1
|
+
import { EncodingCategory } from '../Common/EncodingCategory';
|
|
2
|
+
import { EncodingCharacterBase } from '../Common/EncodingCharacterBase';
|
|
3
|
+
import { EncodingEntry } from '../Common/EncodingEntry';
|
|
4
|
+
import { SemaphoreDirection } from './SemaphoreDirection';
|
|
5
|
+
import { SemaphoreEncoding } from './SemaphoreEncoding';
|
|
6
|
+
export declare class SemaphoreCharacter extends EncodingCharacterBase<SemaphoreEncoding> {
|
|
7
|
+
private static parseEncoding;
|
|
8
|
+
private _directions;
|
|
9
|
+
constructor(encoding?: SemaphoreEncoding, category?: EncodingCategory);
|
|
10
|
+
get directions(): SemaphoreDirection[];
|
|
11
|
+
set directions(value: SemaphoreDirection[]);
|
|
12
|
+
addDirection(direction: SemaphoreDirection | SemaphoreEncoding): void;
|
|
13
|
+
removeDirection(direction: SemaphoreDirection | SemaphoreEncoding): void;
|
|
14
|
+
hasDirection(direction: SemaphoreDirection): boolean;
|
|
15
|
+
getDegrees(): number[];
|
|
16
|
+
getPotentialMatch(other: SemaphoreDirection): EncodingEntry<SemaphoreEncoding> | null;
|
|
17
|
+
protected onClear(): void;
|
|
18
|
+
protected onEmpty(): boolean;
|
|
19
|
+
protected getEncoding(): SemaphoreEncoding;
|
|
20
|
+
}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SemaphoreCharacter = void 0;
|
|
4
|
-
const EncodingCategory_1 = require("../Common/EncodingCategory");
|
|
5
|
-
const EncodingCharacterBase_1 = require("../Common/EncodingCharacterBase");
|
|
6
|
-
const SemaphoreData_1 = require("./SemaphoreData");
|
|
7
|
-
const SemaphoreDegrees_1 = require("./SemaphoreDegrees");
|
|
8
|
-
const SemaphoreEncoding_1 = require("./SemaphoreEncoding");
|
|
9
|
-
class SemaphoreCharacter extends EncodingCharacterBase_1.EncodingCharacterBase {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
get directions() {
|
|
26
|
-
return this._directions;
|
|
27
|
-
}
|
|
28
|
-
set directions(value) {
|
|
29
|
-
this._directions = value.slice(0, 2);
|
|
30
|
-
this.invalidateLookup();
|
|
31
|
-
}
|
|
32
|
-
addDirection(direction) {
|
|
33
|
-
for (const dir of SemaphoreCharacter.parseEncoding(direction)) {
|
|
34
|
-
this._directions.push(dir);
|
|
35
|
-
}
|
|
36
|
-
if (this._directions.length > 2) {
|
|
37
|
-
this._directions.splice(0, this._directions.length - 2);
|
|
38
|
-
}
|
|
39
|
-
this.invalidateLookup();
|
|
40
|
-
}
|
|
41
|
-
removeDirection(direction) {
|
|
42
|
-
for (const dir of SemaphoreCharacter.parseEncoding(direction)) {
|
|
43
|
-
const index = this._directions.indexOf(dir);
|
|
44
|
-
if (index >= 0) {
|
|
45
|
-
this._directions.splice(index, 1);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
this.invalidateLookup();
|
|
49
|
-
}
|
|
50
|
-
hasDirection(direction) {
|
|
51
|
-
return this._directions.indexOf(direction) >= 0;
|
|
52
|
-
}
|
|
53
|
-
getDegrees() {
|
|
54
|
-
return this._directions
|
|
55
|
-
.map(value => SemaphoreDegrees_1.SemaphoreDegrees.ToDegrees(value))
|
|
56
|
-
.sort((a, b) => a - b);
|
|
57
|
-
}
|
|
58
|
-
getPotentialMatch(other) {
|
|
59
|
-
if (this.directions.length !== 1 || this.directions[0] === other) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
const potentialMatch = this.getPotentialMatches().filter(value => (value.encoding & other) === other)[0];
|
|
63
|
-
return potentialMatch || null;
|
|
64
|
-
}
|
|
65
|
-
onClear() {
|
|
66
|
-
this._directions.length = 0;
|
|
67
|
-
}
|
|
68
|
-
onEmpty() {
|
|
69
|
-
return this._directions.length === 0;
|
|
70
|
-
}
|
|
71
|
-
getEncoding() {
|
|
72
|
-
return this._directions.reduce((previousValue, currentValue) => (previousValue |= currentValue), SemaphoreEncoding_1.SemaphoreEncoding.None);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.SemaphoreCharacter = SemaphoreCharacter;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemaphoreCharacter = void 0;
|
|
4
|
+
const EncodingCategory_1 = require("../Common/EncodingCategory");
|
|
5
|
+
const EncodingCharacterBase_1 = require("../Common/EncodingCharacterBase");
|
|
6
|
+
const SemaphoreData_1 = require("./SemaphoreData");
|
|
7
|
+
const SemaphoreDegrees_1 = require("./SemaphoreDegrees");
|
|
8
|
+
const SemaphoreEncoding_1 = require("./SemaphoreEncoding");
|
|
9
|
+
class SemaphoreCharacter extends EncodingCharacterBase_1.EncodingCharacterBase {
|
|
10
|
+
static parseEncoding(encoding) {
|
|
11
|
+
const directions = [];
|
|
12
|
+
for (let i = 1; i <= 8; i++) {
|
|
13
|
+
const direction = (1 << i);
|
|
14
|
+
if ((encoding & direction) === direction) {
|
|
15
|
+
directions.push(direction);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return directions;
|
|
19
|
+
}
|
|
20
|
+
_directions = [];
|
|
21
|
+
constructor(encoding = SemaphoreEncoding_1.SemaphoreEncoding.None, category = EncodingCategory_1.EncodingCategory.All) {
|
|
22
|
+
super(SemaphoreData_1.SemaphoreData.instance, category);
|
|
23
|
+
this.addDirection(encoding);
|
|
24
|
+
}
|
|
25
|
+
get directions() {
|
|
26
|
+
return this._directions;
|
|
27
|
+
}
|
|
28
|
+
set directions(value) {
|
|
29
|
+
this._directions = value.slice(0, 2);
|
|
30
|
+
this.invalidateLookup();
|
|
31
|
+
}
|
|
32
|
+
addDirection(direction) {
|
|
33
|
+
for (const dir of SemaphoreCharacter.parseEncoding(direction)) {
|
|
34
|
+
this._directions.push(dir);
|
|
35
|
+
}
|
|
36
|
+
if (this._directions.length > 2) {
|
|
37
|
+
this._directions.splice(0, this._directions.length - 2);
|
|
38
|
+
}
|
|
39
|
+
this.invalidateLookup();
|
|
40
|
+
}
|
|
41
|
+
removeDirection(direction) {
|
|
42
|
+
for (const dir of SemaphoreCharacter.parseEncoding(direction)) {
|
|
43
|
+
const index = this._directions.indexOf(dir);
|
|
44
|
+
if (index >= 0) {
|
|
45
|
+
this._directions.splice(index, 1);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
this.invalidateLookup();
|
|
49
|
+
}
|
|
50
|
+
hasDirection(direction) {
|
|
51
|
+
return this._directions.indexOf(direction) >= 0;
|
|
52
|
+
}
|
|
53
|
+
getDegrees() {
|
|
54
|
+
return this._directions
|
|
55
|
+
.map(value => SemaphoreDegrees_1.SemaphoreDegrees.ToDegrees(value))
|
|
56
|
+
.sort((a, b) => a - b);
|
|
57
|
+
}
|
|
58
|
+
getPotentialMatch(other) {
|
|
59
|
+
if (this.directions.length !== 1 || this.directions[0] === other) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const potentialMatch = this.getPotentialMatches().filter(value => (value.encoding & other) === other)[0];
|
|
63
|
+
return potentialMatch || null;
|
|
64
|
+
}
|
|
65
|
+
onClear() {
|
|
66
|
+
this._directions.length = 0;
|
|
67
|
+
}
|
|
68
|
+
onEmpty() {
|
|
69
|
+
return this._directions.length === 0;
|
|
70
|
+
}
|
|
71
|
+
getEncoding() {
|
|
72
|
+
return this._directions.reduce((previousValue, currentValue) => (previousValue |= currentValue), SemaphoreEncoding_1.SemaphoreEncoding.None);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.SemaphoreCharacter = SemaphoreCharacter;
|
|
76
76
|
//# sourceMappingURL=SemaphoreCharacter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemaphoreCharacter.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreCharacter.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,2EAAsE;AAGtE,mDAA8C;AAC9C,yDAAoD;AAEpD,2DAAsD;AAEtD,MAAa,kBAAmB,SAAQ,6CAAwC;
|
|
1
|
+
{"version":3,"file":"SemaphoreCharacter.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreCharacter.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,2EAAsE;AAGtE,mDAA8C;AAC9C,yDAAoD;AAEpD,2DAAsD;AAEtD,MAAa,kBAAmB,SAAQ,6CAAwC;IACtE,MAAM,CAAC,aAAa,CAC1B,QAAgD;QAEhD,MAAM,UAAU,GAAyB,EAAE,CAAC;QAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3B,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAuB,CAAC;YACjD,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,KAAK,SAAS,EAAE;gBACxC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC5B;SACF;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,WAAW,GAAyB,EAAE,CAAC;IAE/C,YACE,WAA8B,qCAAiB,CAAC,IAAI,EACpD,WAA6B,mCAAgB,CAAC,GAAG;QAEjD,KAAK,CAAC,6BAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAAI,UAAU,CAAC,KAA2B;QACxC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,I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UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE;YAChE,OAAO,IAAI,CAAC;SACb;QAED,MAAM,cAAc,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC,MAAM,CACtD,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,CAC5C,CAAC,CAAC,CAAC,CAAC;QAEL,OAAO,cAAc,IAAI,IAAI,CAAC;IAChC,CAAC;IAES,OAAO;QACf,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;IAC9B,CAAC;IAES,OAAO;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;IACvC,CAAC;IAES,WAAW;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAC5B,CAAC,aAAa,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC,aAAa,IAAI,YAAY,CAAC,EAChE,qCAAiB,CAAC,IAAI,CACvB,CAAC;IACJ,CAAC;CACF;AAjGD,gDAiGC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EncodingDataBase } from '../Common/EncodingDataBase';
|
|
2
|
-
import { SemaphoreEncoding } from './SemaphoreEncoding';
|
|
3
|
-
export declare class SemaphoreData extends EncodingDataBase<SemaphoreEncoding> {
|
|
4
|
-
static readonly instance: SemaphoreData;
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
1
|
+
import { EncodingDataBase } from '../Common/EncodingDataBase';
|
|
2
|
+
import { SemaphoreEncoding } from './SemaphoreEncoding';
|
|
3
|
+
export declare class SemaphoreData extends EncodingDataBase<SemaphoreEncoding> {
|
|
4
|
+
static readonly instance: SemaphoreData;
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SemaphoreData = void 0;
|
|
4
|
-
const EncodingCategory_1 = require("../Common/EncodingCategory");
|
|
5
|
-
const EncodingDataBase_1 = require("../Common/EncodingDataBase");
|
|
6
|
-
const SemaphoreEncoding_1 = require("./SemaphoreEncoding");
|
|
7
|
-
class SemaphoreData extends EncodingDataBase_1.EncodingDataBase {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
13
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
14
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
15
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
16
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
17
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
18
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
19
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
20
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
21
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
22
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
23
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
24
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
25
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
26
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
27
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
28
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
29
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
30
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
31
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
32
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
33
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
34
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
35
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
36
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
40
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
41
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
42
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
43
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
44
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
45
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
46
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
47
|
-
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
SemaphoreData
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemaphoreData = void 0;
|
|
4
|
+
const EncodingCategory_1 = require("../Common/EncodingCategory");
|
|
5
|
+
const EncodingDataBase_1 = require("../Common/EncodingDataBase");
|
|
6
|
+
const SemaphoreEncoding_1 = require("./SemaphoreEncoding");
|
|
7
|
+
class SemaphoreData extends EncodingDataBase_1.EncodingDataBase {
|
|
8
|
+
static instance = new SemaphoreData();
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
// Letters
|
|
12
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterA, EncodingCategory_1.EncodingCategory.Letter, 'A');
|
|
13
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterB, EncodingCategory_1.EncodingCategory.Letter, 'B');
|
|
14
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterC, EncodingCategory_1.EncodingCategory.Letter, 'C');
|
|
15
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterD, EncodingCategory_1.EncodingCategory.Letter, 'D');
|
|
16
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterE, EncodingCategory_1.EncodingCategory.Letter, 'E');
|
|
17
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterF, EncodingCategory_1.EncodingCategory.Letter, 'F');
|
|
18
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterG, EncodingCategory_1.EncodingCategory.Letter, 'G');
|
|
19
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterH, EncodingCategory_1.EncodingCategory.Letter, 'H');
|
|
20
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterI, EncodingCategory_1.EncodingCategory.Letter, 'I');
|
|
21
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterJ, EncodingCategory_1.EncodingCategory.Letter, 'J');
|
|
22
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterK, EncodingCategory_1.EncodingCategory.Letter, 'K');
|
|
23
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterL, EncodingCategory_1.EncodingCategory.Letter, 'L');
|
|
24
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterM, EncodingCategory_1.EncodingCategory.Letter, 'M');
|
|
25
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterN, EncodingCategory_1.EncodingCategory.Letter, 'N');
|
|
26
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterO, EncodingCategory_1.EncodingCategory.Letter, 'O');
|
|
27
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterP, EncodingCategory_1.EncodingCategory.Letter, 'P');
|
|
28
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterQ, EncodingCategory_1.EncodingCategory.Letter, 'Q');
|
|
29
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterR, EncodingCategory_1.EncodingCategory.Letter, 'R');
|
|
30
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterS, EncodingCategory_1.EncodingCategory.Letter, 'S');
|
|
31
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterT, EncodingCategory_1.EncodingCategory.Letter, 'T');
|
|
32
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterU, EncodingCategory_1.EncodingCategory.Letter, 'U');
|
|
33
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterV, EncodingCategory_1.EncodingCategory.Letter, 'V');
|
|
34
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterW, EncodingCategory_1.EncodingCategory.Letter, 'W');
|
|
35
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterX, EncodingCategory_1.EncodingCategory.Letter, 'X');
|
|
36
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterY, EncodingCategory_1.EncodingCategory.Letter, 'Y');
|
|
37
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.LetterZ, EncodingCategory_1.EncodingCategory.Letter, 'Z');
|
|
38
|
+
// Numbers
|
|
39
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number1, EncodingCategory_1.EncodingCategory.Number, '1');
|
|
40
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number2, EncodingCategory_1.EncodingCategory.Number, '2');
|
|
41
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number3, EncodingCategory_1.EncodingCategory.Number, '3');
|
|
42
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number4, EncodingCategory_1.EncodingCategory.Number, '4');
|
|
43
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number5, EncodingCategory_1.EncodingCategory.Number, '5');
|
|
44
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number6, EncodingCategory_1.EncodingCategory.Number, '6');
|
|
45
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number7, EncodingCategory_1.EncodingCategory.Number, '7');
|
|
46
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number8, EncodingCategory_1.EncodingCategory.Number, '8');
|
|
47
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number9, EncodingCategory_1.EncodingCategory.Number, '9');
|
|
48
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.Number0, EncodingCategory_1.EncodingCategory.Number, '0');
|
|
49
|
+
// Formatting
|
|
50
|
+
this.addToList(SemaphoreEncoding_1.SemaphoreEncoding.FormattingNumber, EncodingCategory_1.EncodingCategory.Formatting, '#');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.SemaphoreData = SemaphoreData;
|
|
54
54
|
//# sourceMappingURL=SemaphoreData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemaphoreData.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreData.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,iEAA4D;AAC5D,2DAAsD;AAEtD,MAAa,aAAc,SAAQ,mCAAmC;
|
|
1
|
+
{"version":3,"file":"SemaphoreData.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreData.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,iEAA4D;AAC5D,2DAAsD;AAEtD,MAAa,aAAc,SAAQ,mCAAmC;IACpE,MAAM,CAAU,QAAQ,GAAkB,IAAI,aAAa,EAAE,CAAC;IAE9D;QACE,KAAK,EAAE,CAAC;QAER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qCAAiB,CAAC,gBAAgB,EAClC,mCAAgB,CAAC,UAAU,EAC3B,GAAG,CACJ,CAAC;IACJ,CAAC;;AApDH,sCAqDC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SemaphoreDirection } from './SemaphoreDirection';
|
|
2
|
-
export declare class SemaphoreDegrees {
|
|
3
|
-
static FromDegrees(degrees: number): number;
|
|
4
|
-
static ToDegrees(direction: SemaphoreDirection): number;
|
|
5
|
-
}
|
|
1
|
+
import { SemaphoreDirection } from './SemaphoreDirection';
|
|
2
|
+
export declare class SemaphoreDegrees {
|
|
3
|
+
static FromDegrees(degrees: number): number;
|
|
4
|
+
static ToDegrees(direction: SemaphoreDirection): number;
|
|
5
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SemaphoreDegrees = void 0;
|
|
4
|
-
const SemaphoreDirection_1 = require("./SemaphoreDirection");
|
|
5
|
-
class SemaphoreDegrees {
|
|
6
|
-
static FromDegrees(degrees) {
|
|
7
|
-
if (degrees >= 360) {
|
|
8
|
-
degrees = degrees % 360;
|
|
9
|
-
}
|
|
10
|
-
if (degrees % 45 !== 0 || degrees < 0) {
|
|
11
|
-
throw new Error('Invalid degrees');
|
|
12
|
-
}
|
|
13
|
-
const position = degrees / 45;
|
|
14
|
-
return SemaphoreDirection_1.SemaphoreDirection.North << position;
|
|
15
|
-
}
|
|
16
|
-
static ToDegrees(direction) {
|
|
17
|
-
let position = SemaphoreDirection_1.SemaphoreDirection.North;
|
|
18
|
-
let counter = 0;
|
|
19
|
-
while (counter < 9 && position !== direction) {
|
|
20
|
-
position = position << 1;
|
|
21
|
-
counter++;
|
|
22
|
-
}
|
|
23
|
-
return counter * 45;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.SemaphoreDegrees = SemaphoreDegrees;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemaphoreDegrees = void 0;
|
|
4
|
+
const SemaphoreDirection_1 = require("./SemaphoreDirection");
|
|
5
|
+
class SemaphoreDegrees {
|
|
6
|
+
static FromDegrees(degrees) {
|
|
7
|
+
if (degrees >= 360) {
|
|
8
|
+
degrees = degrees % 360;
|
|
9
|
+
}
|
|
10
|
+
if (degrees % 45 !== 0 || degrees < 0) {
|
|
11
|
+
throw new Error('Invalid degrees');
|
|
12
|
+
}
|
|
13
|
+
const position = degrees / 45;
|
|
14
|
+
return SemaphoreDirection_1.SemaphoreDirection.North << position;
|
|
15
|
+
}
|
|
16
|
+
static ToDegrees(direction) {
|
|
17
|
+
let position = SemaphoreDirection_1.SemaphoreDirection.North;
|
|
18
|
+
let counter = 0;
|
|
19
|
+
while (counter < 9 && position !== direction) {
|
|
20
|
+
position = position << 1;
|
|
21
|
+
counter++;
|
|
22
|
+
}
|
|
23
|
+
return counter * 45;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SemaphoreDegrees = SemaphoreDegrees;
|
|
27
27
|
//# sourceMappingURL=SemaphoreDegrees.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare enum SemaphoreDirection {
|
|
2
|
-
None = 0,
|
|
3
|
-
North = 2,
|
|
4
|
-
NorthEast = 4,
|
|
5
|
-
East = 8,
|
|
6
|
-
SouthEast = 16,
|
|
7
|
-
South = 32,
|
|
8
|
-
SouthWest = 64,
|
|
9
|
-
West = 128,
|
|
10
|
-
NorthWest = 256
|
|
11
|
-
}
|
|
1
|
+
export declare enum SemaphoreDirection {
|
|
2
|
+
None = 0,
|
|
3
|
+
North = 2,
|
|
4
|
+
NorthEast = 4,
|
|
5
|
+
East = 8,
|
|
6
|
+
SouthEast = 16,
|
|
7
|
+
South = 32,
|
|
8
|
+
SouthWest = 64,
|
|
9
|
+
West = 128,
|
|
10
|
+
NorthWest = 256
|
|
11
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SemaphoreDirection = void 0;
|
|
4
|
-
var SemaphoreDirection;
|
|
5
|
-
(function (SemaphoreDirection) {
|
|
6
|
-
SemaphoreDirection[SemaphoreDirection["None"] = 0] = "None";
|
|
7
|
-
SemaphoreDirection[SemaphoreDirection["North"] = 2] = "North";
|
|
8
|
-
SemaphoreDirection[SemaphoreDirection["NorthEast"] = 4] = "NorthEast";
|
|
9
|
-
SemaphoreDirection[SemaphoreDirection["East"] = 8] = "East";
|
|
10
|
-
SemaphoreDirection[SemaphoreDirection["SouthEast"] = 16] = "SouthEast";
|
|
11
|
-
SemaphoreDirection[SemaphoreDirection["South"] = 32] = "South";
|
|
12
|
-
SemaphoreDirection[SemaphoreDirection["SouthWest"] = 64] = "SouthWest";
|
|
13
|
-
SemaphoreDirection[SemaphoreDirection["West"] = 128] = "West";
|
|
14
|
-
SemaphoreDirection[SemaphoreDirection["NorthWest"] = 256] = "NorthWest";
|
|
15
|
-
})(SemaphoreDirection
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SemaphoreDirection = void 0;
|
|
4
|
+
var SemaphoreDirection;
|
|
5
|
+
(function (SemaphoreDirection) {
|
|
6
|
+
SemaphoreDirection[SemaphoreDirection["None"] = 0] = "None";
|
|
7
|
+
SemaphoreDirection[SemaphoreDirection["North"] = 2] = "North";
|
|
8
|
+
SemaphoreDirection[SemaphoreDirection["NorthEast"] = 4] = "NorthEast";
|
|
9
|
+
SemaphoreDirection[SemaphoreDirection["East"] = 8] = "East";
|
|
10
|
+
SemaphoreDirection[SemaphoreDirection["SouthEast"] = 16] = "SouthEast";
|
|
11
|
+
SemaphoreDirection[SemaphoreDirection["South"] = 32] = "South";
|
|
12
|
+
SemaphoreDirection[SemaphoreDirection["SouthWest"] = 64] = "SouthWest";
|
|
13
|
+
SemaphoreDirection[SemaphoreDirection["West"] = 128] = "West";
|
|
14
|
+
SemaphoreDirection[SemaphoreDirection["NorthWest"] = 256] = "NorthWest";
|
|
15
|
+
})(SemaphoreDirection || (exports.SemaphoreDirection = SemaphoreDirection = {}));
|
|
16
16
|
//# sourceMappingURL=SemaphoreDirection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemaphoreDirection.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreDirection.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B,2DAAQ,CAAA;IACR,6DAAc,CAAA;IACd,qEAAkB,CAAA;IAClB,2DAAa,CAAA;IACb,sEAAkB,CAAA;IAClB,8DAAc,CAAA;IACd,sEAAkB,CAAA;IAClB,6DAAa,CAAA;IACb,uEAAkB,CAAA;AACpB,CAAC,EAVW,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SemaphoreDirection.js","sourceRoot":"","sources":["../../../src/Semaphore/SemaphoreDirection.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B,2DAAQ,CAAA;IACR,6DAAc,CAAA;IACd,qEAAkB,CAAA;IAClB,2DAAa,CAAA;IACb,sEAAkB,CAAA;IAClB,8DAAc,CAAA;IACd,sEAAkB,CAAA;IAClB,6DAAa,CAAA;IACb,uEAAkB,CAAA;AACpB,CAAC,EAVW,kBAAkB,kCAAlB,kBAAkB,QAU7B"}
|