1. pygame
  2. Untitled project
  3. pygamegsoc12

Source

pygamegsoc12 / alchemymadness / main.py

Diff from to

File alchemymadness/main.py

+from random import randint
 
 import pygame
 from pygame.locals import *
     # Initialise level
     pot = potion.Potion()
     pot.set_formula(3, 5, 3)
+    # TODO: change something so potion dont start filled with white fluid
     sprites = pygame.sprite.LayeredDirty(pot)
     sprites.clear(screen, resources.background)
 
                     blks.action_move_up()
                 if e.key == K_DOWN:
                     blks.action_move_down()
+                if e.key == K_c:
+                    blks.change_color((randint(0,255),randint(0,255),randint(0,255)))
 
                 # press keys 1-4 to control player 1-4.
                 if e.key in [K_1, K_2, K_3, K_4]: