# mg-203/programmierworkshop-borg-mittersill architecture

> Architecture diagram of the GitHub repository mg-203/programmierworkshop-borg-mittersill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mg-203/programmierworkshop-borg-mittersill
- Repository: https://github.com/mg-203/programmierworkshop-borg-mittersill

## Overview

This repository is a German programming-workshop example that teaches a Space Invaders game through seven increasingly capable, standalone Pygame scripts. The workflow progresses from displaying and moving a player to enemies, shooting, collision scoring, game-over/high-score handling, and animated explosions. The scripts are monolithic rather than layers of one shared application, so the graph treats each chapter as its own implementation. Source excerpts show the later gameplay and media references; earlier chapters are represented by their indexed files, without inferred links between chapters.

Main entry points: [`chapter_7/main.py`](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_7/main.py) (Explosions), [`chapter_5/main.py`](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_5/main.py) (Score And Audio), [`shot.mp3`](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/shot.mp3) (Shot Sound), [`explosion.mp3`](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/explosion.mp3) (Explosion Sound)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intro["Game Foundations"]
  node_chapter1["Display Player<br/>[main.py]"]
  node_chapter2["Move Player<br/>[main.py]"]
  node_chapter3["Move Enemies<br/>[main.py]"]
end

subgraph group_gameplay["Gameplay Chapters"]
  node_chapter4["Add Shooting<br/>[main.py]"]
  node_chapter5["Score And Audio<br/>[main.py]"]
  node_chapter6["Game Over<br/>[main.py]"]
  node_chapter7["Explosions<br/>[main.py]"]
end

subgraph group_media["Game Media"]
  node_shot["Shot Sound<br/>[shot.mp3]"]
  node_explosion["Explosion Sound<br/>[explosion.mp3]"]
  node_music["Background Music<br/>[background.mp3]"]
  node_frame_cutter["Sprite Cutter<br/>[cut.py]"]
  node_frames["Explosion Frames"]
end

node_player(("Player"))

node_player -->|"sends input"| node_chapter7
node_chapter5 -->|"plays on fire"| node_shot
node_chapter5 -->|"plays on hit"| node_explosion
node_chapter7 -->|"plays repeatedly"| node_music
node_chapter7 -->|"plays on fire"| node_shot
node_chapter7 -->|"plays on hit"| node_explosion
node_frame_cutter -->|"saves frames"| node_frames
node_chapter7 -->|"loads frames"| node_frames

click node_chapter1 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_1/main.py"
click node_chapter2 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_2/main.py"
click node_chapter3 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_3/main.py"
click node_chapter4 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_4/main.py"
click node_chapter5 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_5/main.py"
click node_chapter6 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_6/main.py"
click node_chapter7 "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_7/main.py"
click node_shot "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/shot.mp3"
click node_explosion "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/explosion.mp3"
click node_music "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/background.mp3"
click node_frame_cutter "https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/explosion/cut.py"
click node_frames "https://github.com/mg-203/programmierworkshop-borg-mittersill/tree/main/explosion_frames"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chapter1,node_chapter2,node_chapter3 toneBlue
class node_chapter4,node_chapter5,node_chapter6,node_chapter7 toneAmber
class node_shot,node_explosion,node_music,node_frame_cutter,node_frames toneMint
class node_player toneIndigo
```

## Components

### Game Foundations

- [Display Player](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_1/main.py): `chapter_1/main.py`
- [Move Player](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_2/main.py): `chapter_2/main.py`
- [Move Enemies](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_3/main.py): `chapter_3/main.py`

### Gameplay Chapters

- [Add Shooting](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_4/main.py): `chapter_4/main.py`
- [Score And Audio](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_5/main.py): `chapter_5/main.py`
- [Game Over](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_6/main.py): `chapter_6/main.py`
- [Explosions](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/chapter_7/main.py): `chapter_7/main.py`

### Game Media

- [Shot Sound](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/shot.mp3): `shot.mp3`
- [Explosion Sound](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/explosion.mp3): `explosion.mp3`
- [Background Music](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/background.mp3): `background.mp3`
- [Sprite Cutter](https://github.com/mg-203/programmierworkshop-borg-mittersill/blob/main/explosion/cut.py): `explosion/cut.py`
- [Explosion Frames](https://github.com/mg-203/programmierworkshop-borg-mittersill/tree/main/explosion_frames): `explosion_frames`

### Other components

- **Player**

## Connections

- Player → Explosions: sends input (evidence: `chapter_7/main.py`)
- Score And Audio → Shot Sound: plays on fire (evidence: `chapter_5/main.py`)
- Score And Audio → Explosion Sound: plays on hit (evidence: `chapter_5/main.py`)
- Explosions → Background Music: plays repeatedly (evidence: `chapter_7/main.py`)
- Explosions → Shot Sound: plays on fire (evidence: `chapter_7/main.py`)
- Explosions → Explosion Sound: plays on hit (evidence: `chapter_7/main.py`)
- Sprite Cutter → Explosion Frames: saves frames (evidence: `explosion/cut.py`)
- Explosions → Explosion Frames: loads frames (evidence: `chapter_7/main.py`)
