Commits

illume committed 59db4ab

added screenshot function with S key

  • Participants
  • Parent commits 1d1479c

Comments (0)

Files changed (1)

File alchemymadness/main.py

         for e in events:
             if e.type == KEYDOWN and e.key == K_SPACE:
                 pot.add_color((255,0,0))
+            if e.type == KEYDOWN and e.key == K_s:
+                pygame.image.save(screen, "screeny.png")
+                
             if e.type == QUIT or e.type == KEYDOWN and e.key == K_ESCAPE:
                 going = False
 
     score = pot.get_score()
 
     pygame.quit()
+
+if __name__ == "__main__":
+    main()