added what will happen when your goal rank and current rank are the same

This commit is contained in:
Pawel Orzech 2019-08-08 11:40:48 +01:00
parent 1ee6e7f111
commit c1b9f96a48

View file

@ -2025,12 +2025,18 @@ def rank_up():
# with open('personal.json', 'w') as json_file: # with open('personal.json', 'w') as json_file:
# json.dump(r.json(), json_file) # json.dump(r.json(), json_file)
levels_to_farm = int(goal_rank) - int(r.json()['user']['rank']) levels_to_farm = int(goal_rank) - int(r.json()['user']['rank'])
print('Levels to farm: ' +str(levels_to_farm)) print('Levels to farm: ' +str(levels_to_farm))
while current_rank < goal_rank:
#If your current rank is lower than goal rank we gonna farm.
if int(goal_rank) == int(current_rank):
#If your current rank and goal rank are the same we are going to stop farming.
print('It is done. Your rank is: ' +str(goal_rank))
#################################################################### ####################################################################