Würfel
This commit is contained in:
commit
e957a37aec
8 files changed
+476
No files matched your search
Generated
+10
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.13 (Würfel)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
from .compute import matmul, transpose, rot_2d
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
|
||||||
|
from collections.abc import Sequence
|
||||||
|
import math
|
||||||
|
|
||||||
|
Number = float | int
|
||||||
|
Matrix = Sequence[Sequence[Number]]
|
||||||
|
|
||||||
|
|
||||||
|
def _to_clean_matrix(matrix: Matrix, name: str = "Matrix") -> list[list[Number]]:
|
||||||
|
"""Hilfsfunktion: Validiert die Matrixform und wandelt sie in eine Liste von Listen um."""
|
||||||
|
rows = [list(row) for row in matrix]
|
||||||
|
if not rows:
|
||||||
|
raise ValueError(f"{name} darf nicht leer sein.")
|
||||||
|
|
||||||
|
row_len = len(rows[0])
|
||||||
|
if row_len == 0:
|
||||||
|
raise ValueError(f"{name} darf keine leeren Zeilen enthalten.")
|
||||||
|
|
||||||
|
if not all(len(row) == row_len for row in rows):
|
||||||
|
raise ValueError(f"Alle Zeilen von {name} müssen die gleiche Länge haben.")
|
||||||
|
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def matmul(a: Matrix, b: Matrix) -> list[list[Number]]:
|
||||||
|
"""Multipliziert zwei 2D-Matrizen a und b."""
|
||||||
|
a_rows = _to_clean_matrix(a, name="Matrix A")
|
||||||
|
b_rows = _to_clean_matrix(b, name="Matrix B")
|
||||||
|
|
||||||
|
m = len(a_rows)
|
||||||
|
k_a = len(a_rows[0])
|
||||||
|
k_b = len(b_rows)
|
||||||
|
n = len(b_rows[0])
|
||||||
|
|
||||||
|
if k_a != k_b:
|
||||||
|
raise ValueError(
|
||||||
|
f"Inkompatible Dimensionen für Matrizenmultiplikation: "
|
||||||
|
f"({m}x{k_a}) kann nicht mit ({k_b}x{n}) multipliziert werden."
|
||||||
|
)
|
||||||
|
|
||||||
|
result: list[list[Number]] = []
|
||||||
|
for i in range(m):
|
||||||
|
row: list[Number] = []
|
||||||
|
for j in range(n):
|
||||||
|
val = sum(a_rows[i][p] * b_rows[p][j] for p in range(k_a))
|
||||||
|
row.append(val)
|
||||||
|
result.append(row)
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def transpose(matrix: Matrix) -> list[list[Number]]:
|
||||||
|
"""Transponiert eine 2D-Matrix."""
|
||||||
|
rows = _to_clean_matrix(matrix, name="Matrix")
|
||||||
|
return [list(col) for col in zip(*rows)]
|
||||||
|
|
||||||
|
|
||||||
|
def rot_2d(matrix_or_vec: Sequence[Number] | Matrix, angle_rad: float | None = None) -> list[Number] | list[
|
||||||
|
list[Number]]:
|
||||||
|
"""Rotiert entweder einen 2D-Vektor um angle_rad oder eine Matrix um 90 Grad."""
|
||||||
|
# Falls als 2D-Vektor aufgerufen: rot_2d([x, y], angle_rad)
|
||||||
|
if angle_rad is not None:
|
||||||
|
if len(matrix_or_vec) != 2:
|
||||||
|
raise ValueError("rot_2d für Vektoren erwartet genau 2 Elemente [x, y].")
|
||||||
|
x, y = matrix_or_vec[0], matrix_or_vec[1]
|
||||||
|
cos_a = math.cos(angle_rad)
|
||||||
|
sin_a = math.sin(angle_rad)
|
||||||
|
return [x * cos_a - y * sin_a, x * sin_a + y * cos_a]
|
||||||
|
|
||||||
|
# Falls als Matrix aufgerufen: rot_2d(matrix)
|
||||||
|
rows = _to_clean_matrix(matrix_or_vec, name="Matrix")
|
||||||
|
return [list(col) for col in zip(*rows[::-1])]
|
||||||
|
|
||||||
|
|
||||||
|
def rot_3d(angle: float, axis: str) -> list[list[float]]:
|
||||||
|
"""Erzeugt eine 3D-Rotationsmatrix für die Rotation um eine gegebene Achse.
|
||||||
|
|
||||||
|
Formeln der Rotationsmatrizen:
|
||||||
|
------------------------------
|
||||||
|
Rotation um die x-Achse:
|
||||||
|
R_x(θ) = [
|
||||||
|
[1, 0, 0],
|
||||||
|
[0, cos(θ), -sin(θ)],
|
||||||
|
[0, sin(θ), cos(θ)]
|
||||||
|
]
|
||||||
|
|
||||||
|
Rotation um die y-Achse:
|
||||||
|
R_y(θ) = [
|
||||||
|
[ cos(θ), 0, sin(θ)],
|
||||||
|
[ 0, 1, 0],
|
||||||
|
[-sin(θ), 0, cos(θ)]
|
||||||
|
]
|
||||||
|
|
||||||
|
Rotation um die z-Achse:
|
||||||
|
R_z(θ) = [
|
||||||
|
[cos(θ), -sin(θ), 0],
|
||||||
|
[sin(θ), cos(θ), 0],
|
||||||
|
[ 0, 0, 1]
|
||||||
|
]
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
angle : float
|
||||||
|
Rotationswinkel θ im Bogenmaß (Radiant).
|
||||||
|
axis : str
|
||||||
|
Rotationsachse; gültige Werte sind 'x', 'y' oder 'z'.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
list[list[float]]
|
||||||
|
Die 3x3-Rotationsmatrix als Liste von Listen.
|
||||||
|
|
||||||
|
Raises
|
||||||
|
------
|
||||||
|
ValueError
|
||||||
|
Wenn ein ungültiger Achsenbezeichner übergeben wird.
|
||||||
|
"""
|
||||||
|
c = math.cos(angle)
|
||||||
|
s = math.sin(angle)
|
||||||
|
axis_norm = axis.strip().lower()
|
||||||
|
|
||||||
|
if axis_norm == "x":
|
||||||
|
return [
|
||||||
|
[1.0, 0.0, 0.0],
|
||||||
|
[0.0, c, -s],
|
||||||
|
[0.0, s, c],
|
||||||
|
]
|
||||||
|
elif axis_norm == "y":
|
||||||
|
return [
|
||||||
|
[c, 0.0, s],
|
||||||
|
[0.0, 1.0, 0.0],
|
||||||
|
[-s, 0.0, c],
|
||||||
|
]
|
||||||
|
elif axis_norm == "z":
|
||||||
|
return [
|
||||||
|
[c, -s, 0.0],
|
||||||
|
[s, c, 0.0],
|
||||||
|
[0.0, 0.0, 1.0],
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Ungültige Achse '{axis}'. Gültige Werte sind 'x', 'y' oder 'z'.")
|
||||||
|
|
||||||
|
def project_ortho(
|
||||||
|
point: tuple[float, float, float], scale: float = 1
|
||||||
|
) -> tuple[float, float]:
|
||||||
|
"""Projiziert einen 3D-Punkt orthogonal auf eine 2D-Ebene und skaliert ihn optional.
|
||||||
|
|
||||||
|
Die z-Koordinate wird ignoriert. Die verbleibenden x- und y-Koordinaten
|
||||||
|
werden mit dem Skalierungsfaktor multipliziert.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
point : tuple[float, float, float]
|
||||||
|
Die 3D-Koordinaten (x, y, z).
|
||||||
|
scale : float, default=1
|
||||||
|
Der Skalierungsfaktor.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
tuple[float, float]
|
||||||
|
Die projizierten und skalierten 2D-Koordinaten (x * scale, y * scale).
|
||||||
|
"""
|
||||||
|
x, y, _ = point
|
||||||
|
return float(x * scale), float(y * scale)
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
import pygame
|
||||||
|
from Spiel.game import Game
|
||||||
|
from Spiel.compute import matmul, rot_3d, project_ortho
|
||||||
|
|
||||||
|
|
||||||
|
class CubeGame(Game):
|
||||||
|
def __init__(self, title="3D Cube", fps=60, size=(500, 500)):
|
||||||
|
super().__init__(title=title, fps=fps, size=size)
|
||||||
|
|
||||||
|
# Die 8 Eckpunkte des Würfels mit Mittelpunkt im Ursprung
|
||||||
|
self.vertices: list[list[float]] = [
|
||||||
|
[-1.0, -1.0, -1.0],
|
||||||
|
[ 1.0, -1.0, -1.0],
|
||||||
|
[ 1.0, 1.0, -1.0],
|
||||||
|
[-1.0, 1.0, -1.0],
|
||||||
|
[-1.0, -1.0, 1.0],
|
||||||
|
[ 1.0, -1.0, 1.0],
|
||||||
|
[ 1.0, 1.0, 1.0],
|
||||||
|
[-1.0, 1.0, 1.0],
|
||||||
|
]
|
||||||
|
|
||||||
|
# Die 12 Kanten des Würfels (Paare von Punkt-Indizes)
|
||||||
|
self.edges: list[tuple[int, int]] = [
|
||||||
|
# Hintere Fläche (z = -1)
|
||||||
|
(0, 1), (1, 2), (2, 3), (3, 0),
|
||||||
|
# Vordere Fläche (z = 1)
|
||||||
|
(4, 5), (5, 6), (6, 7), (7, 4),
|
||||||
|
# Verbindungen zwischen beiden Flächen
|
||||||
|
(0, 4), (1, 5), (2, 6), (3, 7)
|
||||||
|
]
|
||||||
|
|
||||||
|
# Rotationswinkel um x- und y-Achse
|
||||||
|
self.angle_x: float = 0.0
|
||||||
|
self.angle_y: float = 0.0
|
||||||
|
|
||||||
|
# Skalierungsfaktor zur Darstellung auf dem Bildschirm
|
||||||
|
self.scale: float = 90.0
|
||||||
|
|
||||||
|
# Liste der aktuell projizierten 2D-Bildschirmpunkte
|
||||||
|
self.projected_points: list[tuple[float, float]] = []
|
||||||
|
|
||||||
|
def event_handling(self) -> bool:
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Tastensteuerung für gezielte manuelle Drehung (Pfeiltasten oder WASD)
|
||||||
|
keys = pygame.key.get_pressed()
|
||||||
|
speed = 0.04
|
||||||
|
if keys[pygame.K_LEFT] or keys[pygame.K_a]:
|
||||||
|
self.angle_y -= speed
|
||||||
|
if keys[pygame.K_RIGHT] or keys[pygame.K_d]:
|
||||||
|
self.angle_y += speed
|
||||||
|
if keys[pygame.K_UP] or keys[pygame.K_w]:
|
||||||
|
self.angle_x -= speed
|
||||||
|
if keys[pygame.K_DOWN] or keys[pygame.K_s]:
|
||||||
|
self.angle_x += speed
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def update_game(self) -> bool:
|
||||||
|
# Stetige Grundrotation für die Animation
|
||||||
|
self.angle_x += 0.015
|
||||||
|
self.angle_y += 0.02
|
||||||
|
|
||||||
|
# Rotationsmatrizen für x- und y-Achse erzeugen
|
||||||
|
rx = rot_3D(self.angle_x, "x")
|
||||||
|
ry = rot_3D(self.angle_y, "y")
|
||||||
|
|
||||||
|
# Gesamtrotationsmatrix kombinieren: R = Ry * Rx
|
||||||
|
r_combined = matmul(ry, rx)
|
||||||
|
|
||||||
|
# Bildschirm-Mittelpunkt
|
||||||
|
center_x = self.size[0] / 2
|
||||||
|
center_y = self.size[1] / 2
|
||||||
|
|
||||||
|
self.projected_points = []
|
||||||
|
for vertex in self.vertices:
|
||||||
|
# 3D-Vektor als Spaltenmatrix (3x1) für die Matrizenmultiplikation
|
||||||
|
v_col = [[vertex[0]], [vertex[1]], [vertex[2]]]
|
||||||
|
rotated_col = matmul(r_combined, v_col)
|
||||||
|
rotated_point = [rotated_col[0][0], rotated_col[1][0], rotated_col[2][0]]
|
||||||
|
|
||||||
|
# Orthogonal projizieren und hochskalieren
|
||||||
|
proj_x, proj_y = project_ortho(rotated_point, scale=self.scale)
|
||||||
|
|
||||||
|
# In die Fenstermitte verschieben
|
||||||
|
screen_x = center_x + proj_x
|
||||||
|
screen_y = center_y + proj_y
|
||||||
|
self.projected_points.append((screen_x, screen_y))
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def draw_game(self):
|
||||||
|
# Hintergrund schwarz färben
|
||||||
|
self.screen.fill((0, 0, 0))
|
||||||
|
|
||||||
|
# Die 12 Kanten in Grün zeichnen
|
||||||
|
green = (0, 255, 0)
|
||||||
|
for start_idx, end_idx in self.edges:
|
||||||
|
p1 = self.projected_points[start_idx]
|
||||||
|
p2 = self.projected_points[end_idx]
|
||||||
|
pygame.draw.line(self.screen, green, p1, p2, 2)
|
||||||
|
|
||||||
|
pygame.display.flip()
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
import random
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
class Game:
|
||||||
|
|
||||||
|
SIZE = (500, 500)
|
||||||
|
FPS = 30
|
||||||
|
|
||||||
|
def __init__(self, title="Game", fps=FPS, size=SIZE):
|
||||||
|
self.title = title
|
||||||
|
self.fps = fps
|
||||||
|
self.size = size
|
||||||
|
self.screen = None
|
||||||
|
self.clock = pygame.time.Clock()
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.init_game()
|
||||||
|
self.game_loop()
|
||||||
|
self.exit_game()
|
||||||
|
|
||||||
|
def init_game(self):
|
||||||
|
random.seed()
|
||||||
|
pygame.init()
|
||||||
|
pygame.display.set_caption(self.title)
|
||||||
|
self.set_screen()
|
||||||
|
|
||||||
|
def set_screen(self):
|
||||||
|
if self.screen is None:
|
||||||
|
self.screen = pygame.display.set_mode(self.size)
|
||||||
|
self.screen.fill((0, 0, 0))
|
||||||
|
return self.screen
|
||||||
|
|
||||||
|
def game_loop(self):
|
||||||
|
while True:
|
||||||
|
if not self.event_handling():
|
||||||
|
break
|
||||||
|
if not self.update_game():
|
||||||
|
break
|
||||||
|
self.draw_game()
|
||||||
|
self.clock.tick(self.fps)
|
||||||
|
|
||||||
|
def event_handling(self):
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
return False
|
||||||
|
keys = pygame.key.get_pressed()
|
||||||
|
# TODO: implement key events
|
||||||
|
return True
|
||||||
|
|
||||||
|
def update_game(self):
|
||||||
|
# TODO: implement game logic
|
||||||
|
return True
|
||||||
|
|
||||||
|
def draw_game(self):
|
||||||
|
pygame.display.flip()
|
||||||
|
|
||||||
|
def exit_game(self):
|
||||||
|
pygame.quit()
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info < (3, 11):
|
||||||
|
sys.exit("Dieses Skript braucht Python 3.11 oder neuer (tomllib). "
|
||||||
|
f"Aktuell: {sys.version.split()[0]}")
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import subprocess
|
||||||
|
import tempfile
|
||||||
|
import tomllib
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
PROJECT_DIR = Path(__file__).resolve().parent
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_group(groups: dict, name: str, seen: set[str] | None = None) -> list[str]:
|
||||||
|
"""Löst eine Dependency-Group inkl. {include-group = "..."} rekursiv auf."""
|
||||||
|
seen = set() if seen is None else seen
|
||||||
|
if name in seen:
|
||||||
|
raise ValueError(f"Zyklische include-group: {name}")
|
||||||
|
if name not in groups:
|
||||||
|
raise KeyError(f"Dependency-Group '{name}' nicht gefunden")
|
||||||
|
seen.add(name)
|
||||||
|
result: list[str] = []
|
||||||
|
for entry in groups[name]:
|
||||||
|
if isinstance(entry, str):
|
||||||
|
result.append(entry)
|
||||||
|
elif isinstance(entry, dict) and "include-group" in entry:
|
||||||
|
result.extend(resolve_group(groups, entry["include-group"], seen))
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def collect(data: dict, extras: list[str], groups: list[str], no_main: bool) -> list[str]:
|
||||||
|
project = data.get("project", {})
|
||||||
|
optional = project.get("optional-dependencies", {})
|
||||||
|
dep_groups = data.get("dependency-groups", {})
|
||||||
|
deps: list[str] = []
|
||||||
|
|
||||||
|
if not no_main:
|
||||||
|
deps.extend(project.get("dependencies", []))
|
||||||
|
for extra in extras:
|
||||||
|
if extra not in optional:
|
||||||
|
raise KeyError(f"Optional-Dependency '{extra}' nicht gefunden")
|
||||||
|
deps.extend(optional[extra])
|
||||||
|
for group in groups:
|
||||||
|
deps.extend(resolve_group(dep_groups, group))
|
||||||
|
|
||||||
|
# Duplikate entfernen, Reihenfolge behalten
|
||||||
|
return list(dict.fromkeys(d.strip() for d in deps if d.strip()))
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
|
p.add_argument("-p", "--pyproject", type=Path, default=PROJECT_DIR / "pyproject.toml",
|
||||||
|
help="Pfad zur pyproject.toml (Standard: neben diesem Skript)")
|
||||||
|
p.add_argument("--extra", action="append", default=None,
|
||||||
|
help="nur diese optional-dependencies (mehrfach möglich)")
|
||||||
|
p.add_argument("--group", action="append", default=None,
|
||||||
|
help="nur diese dependency-groups (mehrfach möglich)")
|
||||||
|
p.add_argument("--no-main", action="store_true", help="[project].dependencies weglassen")
|
||||||
|
p.add_argument("--list", action="store_true", help="Abhängigkeiten nur anzeigen")
|
||||||
|
p.add_argument("--write", action="store_true", help="requirements-Datei schreiben statt installieren")
|
||||||
|
p.add_argument("-o", "--output", type=Path, default=PROJECT_DIR / "requirements.txt",
|
||||||
|
help="Zieldatei für --write")
|
||||||
|
args = p.parse_args()
|
||||||
|
|
||||||
|
if not args.pyproject.exists():
|
||||||
|
print(f"{args.pyproject} nicht gefunden", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
data = tomllib.loads(args.pyproject.read_text(encoding="utf-8"))
|
||||||
|
all_extras = list(data.get("project", {}).get("optional-dependencies", {}))
|
||||||
|
all_groups = list(data.get("dependency-groups", {}))
|
||||||
|
|
||||||
|
# Ohne --extra/--group: alles. Mit einem davon: nur das Gewählte.
|
||||||
|
selective = args.extra is not None or args.group is not None
|
||||||
|
extras = (args.extra or []) if selective else all_extras
|
||||||
|
groups = (args.group or []) if selective else all_groups
|
||||||
|
|
||||||
|
try:
|
||||||
|
deps = collect(data, extras, groups, args.no_main)
|
||||||
|
except (KeyError, ValueError) as e:
|
||||||
|
print(f"Fehler: {e.args[0]}", file=sys.stderr)
|
||||||
|
print(f" Vorhandene --extra: {', '.join(all_extras) or '(keine)'}", file=sys.stderr)
|
||||||
|
print(f" Vorhandene --group: {', '.join(all_groups) or '(keine)'}", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
parts = ([] if args.no_main else ["Basis"]) + [f"extra:{e}" for e in extras] + [f"group:{g}" for g in groups]
|
||||||
|
print(f"Auswahl: {', '.join(parts) or '(nichts)'}")
|
||||||
|
|
||||||
|
if args.list:
|
||||||
|
print("\n".join(deps) or "(keine Abhängigkeiten)")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
content = f"# Automatisch erzeugt aus {args.pyproject.name} – nicht von Hand bearbeiten\n" + "\n".join(deps) + "\n"
|
||||||
|
|
||||||
|
if args.write:
|
||||||
|
args.output.write_text(content, encoding="utf-8")
|
||||||
|
print(f"{len(deps)} Abhängigkeiten -> {args.output}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if not deps:
|
||||||
|
print("Keine Abhängigkeiten gefunden – nichts zu tun.")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if sys.prefix == sys.base_prefix:
|
||||||
|
print("WARNUNG: Es ist kein virtuelles Environment aktiv – es wird in die globale "
|
||||||
|
f"Python-Installation installiert:\n {sys.prefix}", file=sys.stderr)
|
||||||
|
if sys.stdin.isatty() and input("Trotzdem fortfahren? [j/N] ").strip().lower() not in ("j", "ja", "y", "yes"):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
with tempfile.NamedTemporaryFile("w", suffix=".txt", delete=False, encoding="utf-8") as tmp:
|
||||||
|
tmp.write(content)
|
||||||
|
tmp_path = Path(tmp.name)
|
||||||
|
try:
|
||||||
|
print(f"Installiere {len(deps)} Abhängigkeiten in {sys.prefix}\n")
|
||||||
|
return subprocess.call([sys.executable, "-m", "pip", "install", "-r", str(tmp_path)])
|
||||||
|
finally:
|
||||||
|
tmp_path.unlink(missing_ok=True)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
from Spiel.cube_game import CubeGame
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
game = CubeGame()
|
||||||
|
game.run()
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[project]
|
||||||
|
name = "wuerfel"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "3D-rotierender Würfel mit Pygame und eigener Matrix-Bibliothek"
|
||||||
|
dependencies = [
|
||||||
|
"pygame>=2.5.0",
|
||||||
|
]
|
||||||
Reference in new issue
Block a user