100 Days of Code Day 3
Ultimate Power!!
Hopefully I post this before midnight and don’t ruin the streak on day 3.
Anyway this time it is three more Exercism exercises in c#.
- Interest is Interesting
- Need for Speed
- Wizards and Warriors.
With three exercises that don’t go together visually I decided to make a picture for just one, the Wizards and Warriors exercise.
I assumed that calculating offensive damage would automatically consume the prepared spell. It wasn’t specified in the description, but otherwise the Wizard is way overpowered against the warrior after just one spell preparation. Looking at other peoples submissions I was alone in that assumption. So this wizard is from just such a world where he over powered. He has ULTIMATE POWER if you will.
I also picked on the Interest is Interesting in my code comments. The instructions say to return a percentage. Which if you say 5% I assume you mean 0.05, not 5. The test cases do not agree with me, but I still think I am right. After all if you want to calculate 50% of 10 then 10 * 0.50 = 5, but 10 * 50 = 500. You have to remember to divide by 100 to get things right again. I must not think like other people.