Beta
Dungeons And Dragons 5th edition leveling utilities
Description:
In the role playing game Dungeons and Dragons 5th edition, you play characters adventure and gain levels.
The system provides a number in experience points required to reach a certain level. The required levels are given as a map:
:1 0 :2 300 :3 900 :4 2700 :5 6500 :6 14000 :7 23000 :8 34000 :9 48000 :10 64000 :11 85000 :12 100000 :13 120000 :14 140000 :15 165000 :16 195000 :17 225000 :18 265000 :19 305000 :20 355000
Code three functions:
- Determine the current level of the character based on its current experience points.
- Determine the next level of a character based on its current experience points.
- Determine the experience left to advance to the next level.
Why three functions? You might see some synergy between the first two methods and the last one. These are all valid points you might be asking as a player.
Special rules:
- The level should be returned as a keyword, so we can match it against the level requirement map if needed.
- Level 20 is a special case. Once you reach this max level, your experience until next level should return 0. And your next level should return the max level.
Tips: The level requirements map is not ordered, maybe you might want it to be?
Happy coding! ^_^ Enjoy my first kata.
Games
Puzzles
Similar Kata:
Stats:
Created | Sep 13, 2017 |
Published | Sep 14, 2017 |
Warriors Trained | 41 |
Total Skips | 1 |
Total Code Submissions | 49 |
Total Times Completed | 8 |
Clojure Completions | 8 |
Total Stars | 1 |
% of votes with a positive feedback rating | 100% of 6 |
Total "Very Satisfied" Votes | 6 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |