mit env datei

This commit is contained in:
Julia 2025-10-31 14:50:05 +01:00
parent efa15cbca3
commit 2b6a708f6c
2 changed files with 10 additions and 10 deletions

10
.env
View File

@ -1,6 +1,6 @@
TITLE = "Moon"
FPS = 60
POSITION_MOON = (0, -150)
SIZE = (640, 400)
THETA = 0.01
TITLE="Moon"
FPS=60
POSITION_MOON=0,-150
SIZE=640,400
THETA=0.01

View File

@ -8,10 +8,10 @@ import pygame
load_dotenv()
title = str(os.getenv("TITLE"))
fps = str(os.getenv("FPS"))
size = str(os.getenv("SIZE"))
position_moon = str(os.getenv("POSITION_MOON"))
theta = str(os.getenv("THETA"))
fps = int(os.getenv("FPS"))
size = tuple(map(int, os.getenv("SIZE").split(',')))
theta = float(os.getenv("THETA"))
position_moon = tuple(map(int, os.getenv("POSITION_MOON").split(',')))
WHITE = (255, 255, 255)
@ -59,6 +59,6 @@ class Apollo(Moon):
if __name__ == "__main__":
# created by me and only me
game = Apollo()
game = Apollo(title, fps, size, position_moon, theta)
game.run()