-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Fogs, Paths and Zones class to make Selection deterministic
- Loading branch information
1 parent
fee5443
commit 0cd0636
Showing
6 changed files
with
93 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Fog } from './Fog.js' | ||
|
||
export class Fogs extends Array<Fog> { | ||
toArxData() { | ||
const arxFogs = this.map((fog) => { | ||
return fog.toArxFog() | ||
}) | ||
|
||
return { | ||
fogs: arxFogs, | ||
} | ||
} | ||
|
||
empty() { | ||
this.length = 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Path } from './Path.js' | ||
|
||
export class Paths extends Array<Path> { | ||
toArxData() { | ||
const arxPaths = this.map((path) => { | ||
return path.toArxPath() | ||
}) | ||
|
||
return { | ||
paths: arxPaths, | ||
} | ||
} | ||
|
||
empty() { | ||
this.length = 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Zone } from './Zone.js' | ||
|
||
export class Zones extends Array<Zone> { | ||
toArxData() { | ||
const arxZones = this.map((zone) => { | ||
return zone.toArxZone() | ||
}) | ||
|
||
return { | ||
zones: arxZones, | ||
} | ||
} | ||
|
||
empty() { | ||
this.length = 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters