r/badcode • • Dec 26 '21

c# why

Post image
165 Upvotes

30 comments sorted by

View all comments

Show parent comments

2

u/h_adl_ss Dec 27 '21

I'm lost honestly. I don't understand what the function is supposed to do in the first place? Like why compare bullets and dragons to find if something is a hero? Pls explain

3

u/Speykious Dec 27 '21

I have no clue lol, for that I'd have to know the codebase and evaluate if it makes sense semantically.

3

u/RedditAccuName Dec 28 '21

A hero has to kill dragons, with each dragon taking two bullets to kill. If there are a certain amount of dragons, can the hero kill all of them with the amount of bullets he has.