-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.py
48 lines (41 loc) · 1.3 KB
/
stats.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 'Wages of Fear'
# By Andrey Sidorenko [email protected]
# The game inspired by 'Jeux et casse-tête à programmer' (Jacques Arsac, 1985)
# Bitmap images http://pixabay.com/
# WAV sounds/music https://freesound.org/ (Attribution 3.0 Unported)
# Future TimeSplitters font is licensed under the 1001Fonts Free For Commercial Use License (FFC)
# Released under a "Simplified BSD" license
class GameStats():
"""
Track statistics for Wages of Fear
"""
def __init__(self):
"""
Initialize statistics
"""
self.reset_stats()
self.diamonds_collected = 0
self.inkblots_killed = 0
self.deaths_killed = 0
def reset_stats(self):
"""
Reset statistcis that can be changed during the game
"""
self.diamonds_collected = 0
self.inkblots_killed = 0
self.deaths_killed = 0
def diamond_collected(self):
"""
Count the number of collected diamonds
"""
self.diamonds_collected += 1
def inkblot_killed(self):
"""
Count the number of killed inkblots
"""
self.inkblots_killed += 1
def death_killed(self):
"""
Count the number of killed deaths
"""
self.deaths_killed += 1