Challenge-Paket um in JavaScript zu entscheiden, zu wiederholen und Daten in Listen und Objekten zu sammeln.
  • TypeScript 95.1%
  • Shell 4.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
oliver.maklott b7da193fe0
All checks were successful
pack / pack (push) Successful in 15s
2.2.0: @aivopod/sdk 0.20.0, the SDK from the platform instead of the bundle (needs platform 0.20, aivopod-app D254)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:50:38 +00:00
.forgejo/workflows SDK 0.10.0 and the newest CLI release in CI: the registry keeps only recent stable versions, the pinned ones were removed (aivopod-app D179) 2026-10-08 15:08:24 +00:00
.githooks D07: javascript-grundlagen-2 1.0.0 – decisions, loops, types, lists, objects 2026-09-30 11:07:55 +00:00
datentypen 2.0.1: English names of SDK 0.13 (aivopod pack migrate, the rest by hand), texts in locales/de.json; @aivopod/sdk 0.13.0 (aivopod-app Plan 12, G0.7) 2026-10-10 17:27:24 +00:00
entscheidungen 2.0.1: English names of SDK 0.13 (aivopod pack migrate, the rest by hand), texts in locales/de.json; @aivopod/sdk 0.13.0 (aivopod-app Plan 12, G0.7) 2026-10-10 17:27:24 +00:00
games/sticks-duel 2.1.0: the bot game sticks-duel (Stäbchen-Duell) – entscheide(ansicht) / decide(view) in the student API, tournaments of the class's bots; README (aivopod-app Plan 12, G13d, D226) 2026-10-11 00:34:59 +00:00
listen 2.0.1: English names of SDK 0.13 (aivopod pack migrate, the rest by hand), texts in locales/de.json; @aivopod/sdk 0.13.0 (aivopod-app Plan 12, G0.7) 2026-10-10 17:27:24 +00:00
locales 2.1.0: objekte on the student API – describe(animal) in English, beschreibe(tier) in German (names/de.json); the teacher picks the code language per assignment; the same test cases pass in both (aivopod-app Plan 12, G14, D218–D221). Needs platform 0.17 2026-10-10 23:47:52 +00:00
logik 2.0.1: English names of SDK 0.13 (aivopod pack migrate, the rest by hand), texts in locales/de.json; @aivopod/sdk 0.13.0 (aivopod-app Plan 12, G0.7) 2026-10-10 17:27:24 +00:00
names 2.1.0: the bot game sticks-duel (Stäbchen-Duell) – entscheide(ansicht) / decide(view) in the student API, tournaments of the class's bots; README (aivopod-app Plan 12, G13d, D226) 2026-10-11 00:34:59 +00:00
objekte 2.1.0: objekte on the student API – describe(animal) in English, beschreibe(tier) in German (names/de.json); the teacher picks the code language per assignment; the same test cases pass in both (aivopod-app Plan 12, G14, D218–D221). Needs platform 0.17 2026-10-10 23:47:52 +00:00
schleifen 2.0.1: English names of SDK 0.13 (aivopod pack migrate, the rest by hand), texts in locales/de.json; @aivopod/sdk 0.13.0 (aivopod-app Plan 12, G0.7) 2026-10-10 17:27:24 +00:00
scripts D07: javascript-grundlagen-2 1.0.0 – decisions, loops, types, lists, objects 2026-09-30 11:07:55 +00:00
.gitignore D07: javascript-grundlagen-2 1.0.0 – decisions, loops, types, lists, objects 2026-09-30 11:07:55 +00:00
.npmrc D07: javascript-grundlagen-2 1.0.0 – decisions, loops, types, lists, objects 2026-09-30 11:07:55 +00:00
package-lock.json 2.2.0: @aivopod/sdk 0.20.0, the SDK from the platform instead of the bundle (needs platform 0.20, aivopod-app D254) 2026-10-12 20:50:38 +00:00
package.json 2.2.0: @aivopod/sdk 0.20.0, the SDK from the platform instead of the bundle (needs platform 0.20, aivopod-app D254) 2026-10-12 20:50:38 +00:00
README.md 2.1.0: the bot game sticks-duel (Stäbchen-Duell) – entscheide(ansicht) / decide(view) in the student API, tournaments of the class's bots; README (aivopod-app Plan 12, G13d, D226) 2026-10-11 00:34:59 +00:00
student-api.ts 2.1.0: the bot game sticks-duel (Stäbchen-Duell) – entscheide(ansicht) / decide(view) in the student API, tournaments of the class's bots; README (aivopod-app Plan 12, G13d, D226) 2026-10-11 00:34:59 +00:00
tsconfig.json 2.1.0: the bot game sticks-duel (Stäbchen-Duell) – entscheide(ansicht) / decide(view) in the student API, tournaments of the class's bots; README (aivopod-app Plan 12, G13d, D226) 2026-10-11 00:34:59 +00:00

JavaScript-Grundlagen 2

Challenge-Paket für Aivopod: der zweite Teil der JavaScript-Grundlagen. Baut auf javascript-grundlagen auf (Befehle, Konsole, Variablen, Funktionen) und bereitet javascript-und-die-website vor, wo document.getElementById ein Objekt mit Eigenschaften und Methoden liefert. Mit logik (seit 2.0.0) bereitet es auch javascript-und-die-website-2 vor, das &&, || und Schleifen in Schleifen braucht.

Challenge Inhalt
Entscheidungen mit if (entscheidungen) Vergleiche, true/false, if, else, else if
Wiederholen mit Schleifen (schleifen) for, while, Countdown, Endlosschleifen erkennen und reparieren, Summe
Mehr Datentypen (datentypen) typeof, Wahrheitswerte, undefined, length, toUpperCase, == und ===
Und, oder, nicht (logik) &&, ||, !, && vor ||, Schleife in Schleife (seit 2.0.0)
Listen (listen) Arrays, Index ab 0, length, push, for … of
Objekte (objekte) Eigenschaften lesen und ändern, Methoden, console und document als Objekte
Stäbchen-Duell (game:sticks-duel, Bot-Spiel) Jede:r schreibt einen Bot entscheide(ansicht), der entscheidet, wie viele Stäbchen er nimmt; die Bots der Klasse spielen ein Turnier, jedes Spiel lässt sich Zug für Zug nachspielen (seit 2.1.0)

Alle mit drei Stufen (normal, erweitert, experte), in dieser Reihenfolge (aivopod.sequence).

Codesprache (seit 2.1.0): Das Paket hat eine Schüler-API (student-api.ts, deutsche Namen in names/de.json). Die Lehrperson stellt je Zuweisung ein, ob der Code deutsch (beschreibe(tier), entscheide(ansicht)) oder englisch (describe(animal), decide(view)) ist; die Tests prüfen beide. Braucht Aivopod 0.17.

Arbeiten am Paket

npm install          # das SDK aus der Registry der Organisation (.npmrc)
aivopod pack test    # Tests, ohne vitest
aivopod pack preview # alle Schritte im Browser durchspielen
aivopod pack build   # bündeln, prüfen, Release-Archiv in dist/

Veröffentlichen: Die Version in package.json erhöhen (Patch: nur Texte; Nebenversion: Änderungen in bestehenden Challenges oder im Ablauf; Hauptversion: andere Challenges) und nach main bringen. Die CI prüft die Version gegen das letzte Release und legt ein neues Release v<version> mit dem Archiv an. Plattformen, die dieses Repo (oder seine Organisation) als Quelle eingetragen haben, finden es, wenn das Repo das Thema aivopod-pack hat. Entwicklungsversionen (1.2.0-dev.1) lassen sich mit aivopod pack publish direkt für die eigene Schule veröffentlichen, wenn die Plattform das erlaubt.

aivopod.titel und aivopod.ablauf in package.json legen fest, wie das Paket als Ganzes einem Kurs zugewiesen wird: sein Titel und die Challenges in dieser Reihenfolge.

Eine Challenge ist ein Ordner mit index.ts (die Challenge) und index.test.ts (Tests mit expectPass und expectFail). Bilder liegen im Ordner assets/ der Challenge.