Browse Source

Count score

master
Elis Axelsson 4 years ago
parent
commit
40024de721
  1. 6
      watersteal.py

6
watersteal.py

@ -94,6 +94,12 @@ while True:
playerHasBucket = False
bucketrect.bottomleft = (width * 0.9, (height / 4 * 3))
# If player reach goal, count score and restore bucket
if playerrect.left < 0 and playerHasBucket:
playerScore = playerScore + 1
playerHasBucket = False
bucketrect.bottomleft = (width * 0.9, (height / 4 * 3))
# Direct ball movement
if ballrect.left < 0 or ballrect.right > width:
speed[0] = -speed[0]

Loading…
Cancel
Save