From 40871f7cd5f49b846820fd1bfefd595b8ce2a1f4 Mon Sep 17 00:00:00 2001 From: Lukian LEIZOUR Date: Thu, 15 Aug 2024 17:06:52 +0200 Subject: [PATCH] commit --- main.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 7d5add1..d28f805 100644 --- a/main.py +++ b/main.py @@ -2,8 +2,8 @@ from tkinter import * from math import sqrt from time import sleep -WIDTH = 900 -HEIGHT = 600 +WIDTH = 1400 +HEIGHT = 800 class Planet: def __init__(self, canvas, size, mass, color, x, y): @@ -96,8 +96,6 @@ class System(): def main(): window = Tk() - fps_limit = 75 - canvas = Canvas(window, bg="black", width=WIDTH, height=HEIGHT) canvas.pack() @@ -126,10 +124,10 @@ def main(): blue_moon.orbit(earth) while True: - system.update_all(time.get() / fps_limit, scale.get()) + system.update_all(time.get() / fps.get(), scale.get()) window.update_idletasks() window.update() - sleep(1 / fps_limit) + sleep(1 / fps.get()) if __name__ == "__main__":