]> Skullheadx's Git Forge - Electric-Dipoles.git/commitdiff
fix pygame.Clock() issue main
authorSkullheadx <admonty1@gmail.com>
Sat, 7 Sep 2024 02:25:54 +0000 (22:25 -0400)
committerSkullheadx <admonty1@gmail.com>
Sat, 7 Sep 2024 02:25:54 +0000 (22:25 -0400)
made it pygame.time.Clock()

.gitignore
main.py
requirements.txt

index 854fb5e05e014314805a91e5a0651510e3b45abc..d8d3c8429496f0461afdba5a5aa8b8ba8ecde168 100644 (file)
@@ -161,3 +161,4 @@ cython_debug/
 .idea/
 
 .DS_Store
+image.png
diff --git a/main.py b/main.py
index 306c9e50be2d2ad83d15e85663afe4cd71436930..870bf631a82941b3824f6a9004de9bc035b76816 100644 (file)
--- a/main.py
+++ b/main.py
@@ -2,12 +2,12 @@ from particle import PointParticle
 from setup import *
 
 is_running = True
-clock = pygame.Clock()
+clock = pygame.time.Clock()
 delta = 0
 
 particles = [
-    PointParticle((SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2), -1.6e-19),
-    PointParticle((SCREEN_WIDTH / 3, SCREEN_HEIGHT / 2), 1.6e-19),
+    #PointParticle((SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2), -5 *1.6e-19),
+    PointParticle((SCREEN_WIDTH / 3, SCREEN_HEIGHT / 2), -1.6e-19),
     PointParticle((SCREEN_WIDTH * 2 / 3, SCREEN_HEIGHT / 2), 1.6e-19),
     # PointParticle((SCREEN_WIDTH / 2, SCREEN_HEIGHT * 2 / 3), 1.6e-19),
     # PointParticle((SCREEN_WIDTH / 2, SCREEN_HEIGHT / 3), 1.6e-19),
@@ -31,4 +31,6 @@ while is_running:
         particle.draw(screen)
 
     pygame.display.flip()
+    # pygame.image.save(pygame.display.get_surface(), "image.png")
+    # pygame.quit()
     delta = clock.tick(60)
index fe1052770c7bcc1a683a497110597794130ca65a..8285a32c3855360d15bd625513fa799d33c0d4ba 100644 (file)
@@ -1,2 +1 @@
-
 pygame-ce
\ No newline at end of file