Skip to content

Commit 00ff72f

Browse files
committed
Add method to get XP required to reach the next level in User class
1 parent e33950c commit 00ff72f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ def add_xp(self, amount):
3636
)
3737
self.level += 1
3838

39+
def get_xp_required(self):
40+
"""
41+
Get the required XP for the user to level up.
42+
"""
43+
return self.xp_required
44+
3945

4046
@app.route("/")
4147
def index():

0 commit comments

Comments
 (0)