From 48cda170ddaac16a8c75fd4accda69c8731559f2 Mon Sep 17 00:00:00 2001 From: binaerverkehr <65082683+binaerverkehr@users.noreply.github.com> Date: Sat, 26 Sep 2026 13:25:13 +0200 Subject: [PATCH] Game.light_radius durch Konstante LIGHT_RADIUS ersetzt. --- game.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game.py b/game.py index 7ac7bec..2229515 100644 --- a/game.py +++ b/game.py @@ -3,6 +3,7 @@ import pygame SCREEN_WIDTH = 1280 SCREEN_HEIGHT = 720 PLAYER_SIZE = 20 +LIGHT_RADIUS = 75 class Game: @@ -28,7 +29,6 @@ class Game: self.light_points: list[pygame.Vector2] = [] # Level self.walls = [pygame.Rect(100, 100, 20, 50), pygame.Rect(300, 300, 200, 20), pygame.Rect(550, 80, 20, 200)] - self.light_radius = 75 def run(self) -> None: while self.running: @@ -72,7 +72,7 @@ class Game: """RAYCASTING""" ray_end = pygame.Vector2() self.light_points = [] - vector = pygame.Vector2(self.light_radius, 0) + vector = pygame.Vector2(LIGHT_RADIUS, 0) # Lichtstrahlen berechnen for i in range(360):