Skip to content

Commit

Permalink
Allow up/down arrows to modify max_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
IlIllII committed Feb 7, 2024
1 parent feadbfc commit 82c4566
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mandelbrot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def main():
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
global max_iter
max_iter += 1
elif event.key == pygame.K_DOWN:
max_iter -= 1

draw_mandelbrot()

Expand Down

0 comments on commit 82c4566

Please sign in to comment.