Open bakerbrown opened 4 years ago
I had to make the following changes.
# Marble Madness
from pygame import image
+import pgzrun
+
+from pgzrun import *
+
+from pgzero.builtins import Actor, animate, keyboard
+
+
HEIGHT = 570
WIDTH = 600
gameState = 0
@@ -36,7 +43,7 @@ def update():
marble.speed = min(1,marble.speed + 0.1)
moveMarble()
marble.speed = max(0,marble.speed - 0.01)
-
+
def moveMarble():
global gameState
ccol = getHeight(marbleh.x,marbleh.y)
@@ -60,3 +67,4 @@ def getHeight(x,y):
return heightmap.get_at((int(x),int(y)))
+pgzrun.go()
@orsenthil did you try my PR?
After using pip install pgzero I get an error when trying to run 'NameError: name 'Actor' is not defined'
I am using Python 3.7.5 Pygame 1.9.6 was also installed