Points system added.

This commit is contained in:
Storm Dragon 2019-12-07 23:32:22 -05:00
parent 3226795d2c
commit 50b5552da8

View File

@ -24,6 +24,7 @@ def monkey_taunt():
def player_action(monkey, reaction):
if monkey != reaction: return True
global points
global spanks
left = 0.7
right = 0.7
@ -32,6 +33,7 @@ def player_action(monkey, reaction):
p = pygame.mixer.Channel(2)
p.play(sounds['spank-hit'])
p.set_volume(left, right)
points += 10
spanks += 1
return False
@ -103,6 +105,7 @@ def game(mode):
message.append("You averaged " + str(round(spanks / (totalTime - startTime), 2)) + " monkey spanks per second.")
except:
message.append("You averaged 0.00 monkey spanks per second.")
message.append("You scored " + str(points) + " points.")
time.sleep(0.1)
display_text(message)
return "menu"
@ -111,6 +114,7 @@ def game(mode):
mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
while mode != "exit_game":
spanks = 0
points = 0
if mode == "menu": mode = game_menu("start game", "instructions", "donate", "credits", "learn sounds", "exit_game")
if mode == "start game": mode = game(mode)
if mode == "learn sounds": mode = learn_sounds(sounds)