Commit Graph

157 Commits

Author SHA1 Message Date
dab7c51b90 Merge pull request 'fesature/maze-gen' (#16) from fesature/maze-gen into main
All checks were successful
Build, Test & Push Frontend / quality-check (push) Successful in 50s
Build, Test & Push Frontend / docker (push) Successful in 49s
Reviewed-on: #16
2026-02-09 14:57:36 +01:00
e8354bfecd Add Prim/Kruskal maze gen & nodeData refactor
All checks were successful
Build, Test & Push Frontend / quality-check (pull_request) Successful in 1m10s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
Implement Prim and Kruskal maze generation in the Labyrinth component with animated generation and UI guards. Introduces isAnimationRunning signal, mazeAnimationSpeed, maze node order tracking and animateMazeGeneration; createRandom(now takes a boolean) triggers either Prim or Kruskal flow, sets random start/end, and animates. Refactor Node.distance -> nodeData across models, components and the PathfindingService (Dijkstra/A*) to use nodeData for g-scores/ids. Add SharedFunctions.shuffleArray utility and update i18n (EN/DE) with labels for Prim/Kruskal. Misc: minor cleanup/init changes and drawing logic adjustments to support the new maze flows.
2026-02-09 14:55:05 +01:00
bbec113f5d 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.
2026-02-09 10:57:24 +01:00
950ec75f07 Merge pull request 'Update en.json' (#15) from bugfix/translationbuf into main
All checks were successful
Build, Test & Push Frontend / quality-check (push) Successful in 52s
Build, Test & Push Frontend / docker (push) Successful in 47s
Reviewed-on: #15
2026-02-08 14:03:19 +01:00
854d558e6b Update en.json
All checks were successful
Build, Test & Push Frontend / quality-check (pull_request) Successful in 54s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-08 14:02:52 +01:00
bc740af0bf Merge pull request 'feature/optimize' (#14) from feature/optimize into main
All checks were successful
Build, Test & Push Frontend / quality-check (push) Successful in 52s
Build, Test & Push Frontend / docker (push) Successful in 45s
Reviewed-on: #14
2026-02-07 11:14:32 +01:00
f6ed2057a4 lighthouserc.json aktualisiert
All checks were successful
Build, Test & Push Frontend / quality-check (pull_request) Successful in 56s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 11:12:19 +01:00
a6d8405916 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 49s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 11:01:54 +01:00
41ec7a862f lighthouserc.json aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 7s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:50:01 +01:00
b9f6564771 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 8s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:49:39 +01:00
d8611b0968 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 1m42s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:45:06 +01:00
4d27643d74 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 16s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:43:43 +01:00
48e74ed3e8 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 16s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:42:20 +01:00
e1b1643eb2 .gitea/workflows/build-Frontend-a.yml aktualisiert
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 17s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
2026-02-07 10:39:47 +01:00
0e520ead26 Add Lighthouse CI and expand frontend CI/CD
Some checks failed
Build, Test & Push Frontend / quality-check (pull_request) Failing after 48s
Build, Test & Push Frontend / docker (pull_request) Has been skipped
Replace the previous frontend workflow with an expanded Build, Test & Push workflow. Adds a quality-check job (runs on push and PRs to main) that sets up Node.js, installs deps, runs lint/type checks, unit tests (ChromeHeadless), production build and runs LHCI. The docker job now depends on the quality-check job and only runs on pushes to main. Added lighthouserc.json and ignored .lighthouseci, relaxed two ESLint rules (@typescript-eslint/no-inferrable-types and no-explicit-any), and updated package.json (and lock) to include LHCI tooling.
2026-02-07 10:32:00 +01:00
70ed047059 Optimize Conway and generic grid rendering
Conway GOL: add executionTime tracking and display; switch to double-buffered read/write grids with structuredClone initialization; refactor life update logic (checkLifeRules, swapGrids) to avoid mutating the source while computing the next generation; adjust per-frame delay to account for execution time; increase MAX_GRID_SIZE from 100 to 200; fix grid binding to use readGrid so UI reflects internal state.

Generic grid: add backgroundColor input and use it to clear canvas each frame; only draw cells whose color differs from background and draw grid lines conditionally based on node size to reduce overdraw; adjust drawNode to only stroke borders for larger nodes.

Templates: set backgroundColor='lightgray' for Conway and Pathfinding grid usages; display execution time in Conway UI.

Misc: remove a debug console.log in sorting component. These changes improve rendering performance, reduce flicker, and surface per-frame timing for tuning the Game of Life simulation.
2026-02-07 09:52:58 +01:00
16cc8afd4a Merge pull request 'Increase default grid and rename simple scene' (#13) from bugfix/smallFix into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 44s
Reviewed-on: #13
2026-02-06 22:06:31 +01:00
2a808c1d96 Increase default grid and rename simple scene
Raise default Conway's Game of Life grid size from 40x40 to 50x50 (src/app/pages/algorithms/conway-gol/conway-gol.models.ts) to provide a larger initial viewport. Update i18n labels for the simple scene to 'Glider'/'Gleiter' in English and German respectively (src/assets/i18n/en.json, src/assets/i18n/de.json) for clearer naming.
2026-02-06 22:06:02 +01:00
5d48118add Merge pull request 'feature/gameOfLife' (#12) from feature/gameOfLife into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 42s
Reviewed-on: #12
2026-02-06 22:03:48 +01:00
bf46c57db0 Conway GOL: add scenarios & start/pause loop
Add predefined scenarios (SIMPLE, PULSAR, GUN) and UI controls to generate them; introduce a start/pause game loop driven by an Angular signal. Reduce default grid to 40x40 and max grid to 100, speed up default generation to 30ms, and pause the game when grid size changes. Implement scenario setup helpers (simple, pulsar, glider gun), life-rule evaluation, neighbor counting, grid swapping and a delay helper. Update template to show scenario buttons and conditional start/pause button, and add corresponding i18n entries for English and German.
2026-02-06 22:03:18 +01:00
930f0110b0 Extract generic grid component and refactor uses
Add a reusable GenericGridComponent (canvas + input handling) and migrate Conway Game of Life and Pathfinding pages to use it. New files: shared/components/generic-grid/{html,scss,ts} implement canvas rendering, resizing, input listeners and a callback API (createNodeFn, getNodeColorFn, applySelectionFn, initializationFn) plus gridChange events. Updated templates to replace raw <canvas> with <app-generic-grid> and switched grid size inputs to ngModelChange bindings. Conway and Pathfinding components: remove direct canvas/mouse handling, wire the generic grid callbacks, keep algorithm-specific logic (node creation, coloring, selection, scenarios and animations) but delegate drawing and interaction to GenericGridComponent. This centralizes grid rendering/interaction and simplifies per-algorithm components.
2026-02-06 20:59:56 +01:00
3795090cea Refactor controls UI, styles; bump deps
Consolidate and refactor component styling and markup: remove component-specific SCSS for Conway's Game of Life and Pathfinding and drop their styleUrls, rename per-component .controls blocks to .controls-panel in pathfinding and sorting templates, and move the outer container class onto the mat-card. Add global styles in src/styles.scss for .controls-panel, grid/form sizing, container max-width, and sorting visualization (bar states and transitions). Also update package-lock.json with minor/patch dependency bumps for Angular CLI/devkit/schematics/@schematics/angular, @modelcontextprotocol/sdk and several transitive packages.
2026-02-06 15:06:54 +01:00
59148db295 Enhance Conway's Game of Life UI & interaction
Add interactive controls and drawing support for Conway's Game of Life: introduce Node.alive, Scenario enum, spawn/speed/time constants, random/empty generation, and mouse/touch drawing (click-drag/touch to toggle cells). Update template to include control buttons, speed input, legend, and expose Scenario constants. Implement grid initialization, random seeding, grid position mapping, and optimized node drawing/color logic.

Also update i18n (de/en) with GOL strings and move GRID label keys to ALGORITHM, switch some label usages accordingly. Move generic container/legend styles into global styles.scss (adjust canvas border color), and simplify component SCSS files. Change CONWAYS_WIKI URL to German wiki and remove now-unused UrlConstants references from components.
2026-02-06 14:40:49 +01:00
a22dd17869 Created default build up
- next make grid be a own component with a lot of callbacks
- after this start the game implementtion
2026-02-06 11:52:17 +01:00
da43213808 Created new component and refactored
- Created new component to display the game of life algo
- created an algo info component to combine the algo header for all algos
2026-02-06 09:59:12 +01:00
ff1ee9b5f6 Merge pull request 'feature/pathfinding-finetuning' (#11) from feature/pathfinding-finetuning into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 50s
Reviewed-on: #11
2026-02-05 09:25:41 +01:00
52f0e371ee Add random scenario and refactor case handling
Consolidate scenario creation by replacing separate normal/edge/clear handlers with createCase({withWalls, scenario}). Add a new 'random' scenario that picks random start/end positions and places random walls (controlled by MAX_RANDOM_WALLS_FACTORS). Change pathLength to a string and display "∞" for empty paths. Update applyGridSize logic to avoid unnecessary resets when dimensions unchanged and to initialize with the new API. Add random helper and MAX_RANDOM_WALLS_FACTORS constant, update template buttons to call createCase, and add i18n entries for the random case and updated clear-board label.
2026-02-05 09:24:44 +01:00
f385a154d5 Update pathfinding.component.ts
Created new normal case
2026-02-05 08:35:34 +01:00
38bf7edd53 Unify pathfinding visualize; update About CSS
Consolidate separate visualizeDijkstra/visualizeAStar into a single visualize(algorithm) method and update the template buttons to call visualize('dijkstra') or visualize('astar'). The new method dispatches to the appropriate pathfindingService method, centralizes timing/animation handling, and reduces duplicated logic. Also apply minor About page styling tweaks: add left margin to the Experience h2 and remove the .xp-list rules from the SCSS (small cleanup/reformat).
2026-02-05 08:27:19 +01:00
b52790c9a1 Merge pull request 'Mark sorted bounds and clamp array size' (#10) from bugfix/sorting_fix into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 45s
Reviewed-on: #10
2026-02-04 16:01:44 +01:00
e3d835300b Mark sorted bounds and clamp array size
In the sorting service, mark boundary elements as 'sorted' after each forward/backward pass and push snapshots to capture those states; also adjust the backward loop to start at end-1 to avoid rechecking the already-placed element. In the component, clamp new array size to the MIN_ARRAY_SIZE..MAX_ARRAY_SIZE range in newArraySizeSet. Adds an import for MIN from @angular/forms/signals.
2026-02-04 16:01:18 +01:00
6b64c5f4e9 Merge pull request 'feature/OneMoreSorting' (#9) from feature/OneMoreSorting into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 43s
Reviewed-on: #9
2026-02-04 15:34:18 +01:00
6f282a004b Add Cocktail Sort algorithm and UI
Introduce Cocktail (Shaker) Sort to the sorting visualizer: implement cocktailSort and a helper switchValuesIfCorrect in the SortingService to generate snapshots for the animation. Add SHAKE_SORT_WIKI URL constant and a UI paragraph (with a link) plus German translation text for the algorithm explanation. Expose the new algorithm in the component (availableAlgorithms and switch handling). Also refactor the component to use Angular's inject() for SortingService and ChangeDetectorRef, tighten some typings (timeoutIds -> number[]), adjust default arraySize, and use const where appropriate.
2026-02-04 15:33:51 +01:00
e1680426ad Update sorting.service.ts 2026-02-04 15:01:36 +01:00
3cb3a86b75 Merge pull request 'feature/sortingAlgorithm' (#8) from feature/sortingAlgorithm into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 46s
Reviewed-on: #8
2026-02-04 14:19:59 +01:00
beb5bb7db1 Add sorting explanations, wiki links, and i18n
Introduce Bubble, Quick and Heap Sort documentation: add wiki URL constants, update sorting component to show Bubble/Quick/Heap Sort explanations with Wikipedia links, and include additional disclaimer text and list in the UI. Add corresponding i18n entries in English and German containing algorithm descriptions, note/title and several disclaimer lines.
2026-02-04 14:19:27 +01:00
a10f62f2dd Refactor pathfinding/sorting UI and update i18n
Replace plain container with Angular Material mat-card in pathfinding view and reorganize UI: add mat-card header/content, algorithm explanation block, control buttons, node-type toggle group, grid-size inputs, legend and results display (path length & execution time). Import and wire MatCard modules in the pathfinding component. Move .algo-info styling from the component SCSS into global styles.scss and remove it from the component stylesheet. Update sorting template to use new SORTING translation keys and add an UrlConstants reference in the sorting component TS for external links. Add/adjust i18n keys in en.json and de.json for sorting and grid labels to match the updated templates.
2026-02-04 12:17:54 +01:00
450ab0b837 Implement snapshot-based sorting visualizer
Refactor sorting to produce and consume SortSnapshot sequences for visualization. SortingService now creates immutable snapshots and implements bubble, quick and heap sorts (with helper methods) instead of performing UI delays; a swap/heapify/partition flow records state changes. SortingComponent was updated to animate snapshots (with start/stop timeout handling), added array size input and controls, stores an unsorted copy for resets, and uses ChangeDetectorRef for updates. Minor UI tweaks: faster bar transitions, info color, updated default array size and animation speed, and added i18n keys for ARRAY_SIZE (en/de).
2026-02-04 11:37:11 +01:00
cbc46cf858 initial implementation of sorting algorithms 2026-02-04 09:22:05 +01:00
2aca34fb9c Update package-lock.json 2026-02-04 08:43:08 +01:00
24bf329628 Merge pull request 'Add touch support to pathfinding canvas' (#7) from bugfix/touchbugfix into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 43s
Reviewed-on: #7
2026-02-04 08:36:08 +01:00
e195e93f1a Add touch support to pathfinding canvas
Register touch event handlers (touchstart, touchmove, touchend) that call existing mouse handlers and prevent default scrolling (passive: false) so the canvas can be interacted with on touch devices. Update getGridPosition to accept TouchEvent or MouseEvent, read touch coordinates, and apply canvas-to-CSS scaling (canvas.width/rect.width and canvas.height/rect.height) to correctly map client coordinates to grid cells. This enables accurate touch interaction and handles high-DPI / CSS-scaled canvases.
2026-02-04 08:35:41 +01:00
afe0670098 Merge pull request 'Adjusted small things, norhting serious' (#6) from feature/optimize into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 41s
Reviewed-on: #6
2026-02-02 10:44:38 +01:00
668640dcc6 Adjusted small things, norhting serious 2026-02-02 10:44:13 +01:00
ac937eb2fb Merge pull request 'feature/cleanup' (#5) from feature/cleanup into main
All checks were successful
Build & Push Frontend A / docker (push) Successful in 42s
Reviewed-on: #5
2026-02-02 10:07:26 +01:00
e0f0a0ed04 Enhance pathfinding UI with grid resizing and scenarios
Added controls for dynamic grid size adjustment and scenario presets (normal and edge case) to the pathfinding component. Improved UI/UX with algorithm explanations, Wikipedia links, and reorganized controls. Refactored grid logic for flexibility, updated translations, and improved code structure for maintainability.
2026-02-02 10:06:59 +01:00
17a787b0f1 Small refactoring for better readabilty 2026-02-02 09:28:05 +01:00
01f66d4b8f Fixed smaller rounting bugs 2026-02-02 08:56:51 +01:00
3a13d62c9e Remove particles background and update routing
Deleted the particles background component and its related files. Updated routing logic and constants, refactored topbar and algorithms pages, and performed dependency updates and cleanup in package files. Also improved i18n translations and adjusted TypeScript configuration.
2026-02-02 08:51:10 +01:00
05fc70e583 Update package-lock.json 2026-02-02 07:43:53 +01:00