def experience_to_next_level(self): """Returns the amount of experience the actor needs until the next level is reached.""" # return self.level_up_base + self.current_level * self.level_up_factor result = self.level_up_base * (self.current_level** self.level_up_factor) return myround(result)
def test_myround__default_base_25__26_rounds_to_25(): assert utils.myround(26) == 25
def test_myround__default_base_25__20_rounds_to_0(): assert utils.myround(20) == 25
def test_myround__default_base_25__13_rounds_to_25(): assert utils.myround(13) == 25
def test_myround__default_base_25__12_5_rounds_to_0(): assert utils.myround(12.5) == 0
def test_myround__0(): result = utils.myround(0) assert result == 0