Add labyrinth maze generator and integrate routes
Introduce a new Labyrinth feature: add LabyrinthComponent (TS/HTML/SCSS) implementing maze generation (Prim's/Kruskal) and visualization using the existing generic grid. Wire the component into RouterConstants and app.routes, and add the algorithm entry to AlgorithmsService. Refactor pathfinding internals: rename Node.previousNode -> Node.linkedNode and update PathfindingService and PathfindingComponent accordingly. Add SharedFunctions.random helpers and replace local random utilities. Rename Conway component files/class to ConwayGolComponent and update template path. Add i18n entries for labyrinth (en/de). Minor housekeeping: bump package version to 1.0.0 and disable @typescript-eslint/prefer-for-of in ESLint config.
This commit is contained in:
1 parent
950ec75f07
commit
bbec113f5d
17 files changed
+444
-23
No files matched your search
@@ -7,4 +7,11 @@ export class SharedFunctions {
|
||||
globalThis.location.href = `mailto:${user}@${domain}`;
|
||||
}
|
||||
|
||||
static randomIntFromInterval(min: number, max: number): number {
|
||||
return Math.floor(Math.random() * (max - min + 1) + min);
|
||||
}
|
||||
|
||||
static randomEventIntFromInterval(interval: number): number {
|
||||
return Math.floor(Math.random() * (interval / 2)) * 2;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user