sorting and PLF example 2 with modern form.

a lot of C# to be real!
This commit is contained in:
2025-10-23 11:46:36 +02:00
parent cb1b91ba0f
commit 85670b8a9e
16 changed files with 842 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ pygame.init()
# Screen setup
WIDTH, HEIGHT = 800, 600
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Enhanced Physics Bouncing Balls")
pygame.display.set_caption("balls")
# Colors
BLACK = (0, 0, 0)
@@ -259,15 +259,15 @@ while running:
# Physics info
font = pygame.font.SysFont(None, 22)
info = [
f"Gravity: {gravity:.2f} (↑↓) Elasticity: {elasticity:.2f} (←→)",
f"Air Resistance: {air_resistance:.3f} (WS) Balls: {len(balls)}",
f"SPACE: Add ball C: Clear Drag to throw!"
]
# info = [
# f"Gravity: {gravity:.2f} Elasticity: {elasticity:.2f} (←→)",
# f"Air Resistance: {air_resistance:.3f} (WS) Balls: {len(balls)}",
# f"SPACE: Add ball C: Clear Drag to throw!"
# ]
for i, text in enumerate(info):
surface = font.render(text, True, WHITE)
screen.blit(surface, (10, 10 + i * 25))
# for i, text in enumerate(info):
# surface = font.render(text, True, WHITE)
# screen.blit(surface, (10, 10 + i * 25))
pygame.display.flip()
clock.tick(FPS)