Spaces:
Sleeping
Sleeping
Thibault Duplessis commited on
Commit ·
f37c69a
1
Parent(s): b2fa1c4
improve challenge logging
Browse files
model.py
CHANGED
|
@@ -35,8 +35,14 @@ class Challenge():
|
|
| 35 |
titledBonus = 200 if self.challengerMasterTitle else 0
|
| 36 |
return self.challengerRatingInt + ratedBonus + titledBonus
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
def __str__(self):
|
| 39 |
-
return "{} challenge from {}({})".format(self.perf_name, self.
|
| 40 |
|
| 41 |
def __repr__(self):
|
| 42 |
return self.__str__()
|
|
|
|
| 35 |
titledBonus = 200 if self.challengerMasterTitle else 0
|
| 36 |
return self.challengerRatingInt + ratedBonus + titledBonus
|
| 37 |
|
| 38 |
+
def mode(self):
|
| 39 |
+
return "rated" if self.rated else "casual"
|
| 40 |
+
|
| 41 |
+
def challengerFullName(self):
|
| 42 |
+
return "{}{}".format(self.challengerTitle + " " if self.challengerTitle else "", self.challengerName)
|
| 43 |
+
|
| 44 |
def __str__(self):
|
| 45 |
+
return "{} {} challenge from {}({})".format(self.perf_name, self.mode(), self.challengerFullName(), self.challengerRating)
|
| 46 |
|
| 47 |
def __repr__(self):
|
| 48 |
return self.__str__()
|