summaryrefslogtreecommitdiff
path: root/states.py
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2020-02-23 23:40:08 +0400
committerAndrew <saintruler@gmail.com>2020-02-23 23:40:08 +0400
commit3eca6b22ef70aa0fecf0a221d68bd34a6a2fa16c (patch)
tree63e5ede93602008a7c9180ba6cf7e3f0492a35db /states.py
parent8f44d8a01989627d60ac2a7f98127cebdcf5578f (diff)
Added hidden profiles.
Diffstat (limited to 'states.py')
-rw-r--r--states.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/states.py b/states.py
index 00203b0..b25cc4a 100644
--- a/states.py
+++ b/states.py
@@ -35,9 +35,6 @@ def calc_score(t, base_score=1000):
return round(min(k * (t - max_t) * (t - max_t) + min_score, base_score), 2)
-def calculate_attempts(attempts):
- pass
-
class States:
@staticmethod
@save_state
@@ -173,7 +170,7 @@ class States:
top = {}
for attempt in attempts:
- if not attempt["solved"]:
+ if not attempt["solved"] or attempt["profile"]["is_hidden"]:
continue
if attempt["profile"]["tg_id"] not in top: