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.
This commit is contained in:
2026-02-06 14:40:49 +01:00
parent a22dd17869
commit 59148db295
14 changed files with 276 additions and 98 deletions

View File

@@ -317,9 +317,7 @@
},
"ALERT": {
"START_END_NODES": "Please select a start and end node before running the algorithm."
},
"GRID_HEIGHT": "Height",
"GRID_WIDTH": "Width"
}
},
"SORTING": {
"TITLE": "Sorting Algorithms",
@@ -344,6 +342,11 @@
"GOL": {
"TITLE": "Conway's Game of Life",
"START": "Start",
"RANDOM_SCENE": "Random",
"EMPTY_SCENE": "Empty",
"ALIVE": "Alive",
"DEAD": "Empty",
"SPEED": "Time per Generation",
"EXPLANATION": {
"TITLE": "Erklärung",
"EXPLANATION" : "Das Spiel läuft schrittweise ab. Zunächst wird eine Anfangsgeneration von lebenden Zellen auf dem Spielfeld definiert. Aus der vorliegenden Generation (dem Gesamtbild des Spielfeldes) wird die Folgegeneration ermittelt. Der Zustand jeder einzelnen Zelle in der Folgegeneration ergibt sich dabei nach einfachen Regeln aus ihrem aktuellen Zustand sowie den aktuellen Zuständen ihrer acht Nachbarzellen (Moore-Nachbarschaft).",
@@ -368,6 +371,8 @@
"TITLE:": "Conway's Game of Life",
"DESCRIPTION": "The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970."
},
"NOTE": "Note"
"NOTE": "Note",
"GRID_HEIGHT": "Height",
"GRID_WIDTH": "Width"
}
}