diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..0d9aa0b --- /dev/null +++ b/src/App.vue @@ -0,0 +1,605 @@ + + + Wer die letzte Münze nimmt, verliert. + Trainiere die KI! + + + + Münzen: + {{ this.aktueller_muenzen_stand }} + + + + + + Mensch + + + KI + + + + + + nimm {{ this.gib_muenztext(index) }} + + + + + + + + Anzahl Münzen + + + Mögliche Züge + + + Gemerkter Zug + + + + + {{ element.anzahl_muenzen }} + + + + + nimm {{ zug_moeglichkeit }} + + + + + + + + {{ this.gib_gemerkter_zug_ausgabe(element.gemerkter_zug) }} + + + + + + + + {{ this.ausgabe }} + + + + + + neues Spiel (Münzstand zurücksetzen) + + + + + + + + + Vertiefung: weitere Einstellungsmöglichkeiten + + + + + + Alle gelernten KI-Züge löschen. + + + + + + + Durch jede Änderung werden die gelernten KI-Züge werden gelöscht. + + + Münzenanzahl + + + - + + + {{ this.zustaende }} + + + + + + + + + + + max. Münzen pro Zug + + + - + + + {{ this.max_muenzen_pro_zug }} + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/desert_landscape.png b/src/assets/img/desert_landscape.png new file mode 100644 index 0000000..b19bc7b Binary files /dev/null and b/src/assets/img/desert_landscape.png differ diff --git a/src/assets/img/stadtplan.png b/src/assets/img/stadtplan.png new file mode 100644 index 0000000..71ea315 Binary files /dev/null and b/src/assets/img/stadtplan.png differ diff --git a/src/assets/img/weiss_pixel.png b/src/assets/img/weiss_pixel.png new file mode 100644 index 0000000..ebaa59a Binary files /dev/null and b/src/assets/img/weiss_pixel.png differ diff --git a/src/generateColors.js b/src/generateColors.js new file mode 100644 index 0000000..02baf7c --- /dev/null +++ b/src/generateColors.js @@ -0,0 +1,63 @@ +/* eslint-disable no-unused-vars */ + + + export function generateDifferentColors(x) { + const colors = []; + const step = 360 / x; // Calculate the step size for hue + + for (let i = 0; i < x; i++) { + const hue = i * step; + const saturation = 50; // You can adjust saturation and lightness as needed + const lightness = 50; // for your desired color appearance + + // Convert HSL to RGB + const rgbColor = hslToRgb(hue / 360, saturation / 100, lightness / 100); + + // Convert RGB to HEX + const hexColor = rgbToHex(rgbColor[0], rgbColor[1], rgbColor[2]); + + colors.push(hexColor); + } + + return colors; + } + + function hslToRgb(h, s, l) { + let r, g, b; + + if (s === 0) { + r = g = b = l; // Achromatic + } else { + const hueToRgb = (p, q, t) => { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + }; + + const q = l < 0.5 ? l * (1 + s) : l + s - l * s; + const p = 2 * l - q; + + r = hueToRgb(p, q, h + 1 / 3); + g = hueToRgb(p, q, h); + b = hueToRgb(p, q, h - 1 / 3); + } + + return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; + } + + function rgbToHex(r, g, b) { + return `#${(1 << 24 | r << 16 | g << 8 | b).toString(16).slice(1).toUpperCase()}`; + } + + //const numberOfColors = 10; // Change this to the number of colors you want + //const differentColors = generateDifferentColors(numberOfColors); + //console.log(differentColors); + + export default { + name: 'generateColors', + props: { + } + } diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..01433bc --- /dev/null +++ b/src/main.js @@ -0,0 +1,4 @@ +import { createApp } from 'vue' +import App from './App.vue' + +createApp(App).mount('#app')