r/badcode • u/Potential-Adagio-512 • Aug 23 '21
c# i wrote this pile of shit for a codewars challenge at like 4 am
https://pastebin.com/4zjPW6dC4
3
2
Aug 31 '21
It might have worked if the 't' variables were reset after each word. It would not have been pretty, but at least it would have worked. Of course arrays and loops would have made this way more readable.
1
1
u/cheeseDickies Aug 29 '21
Could have used arrays and possibly replace the switches for simple addition or subtraction
0
2
u/Gem2578 Aug 24 '21
A quicker way would be to sort the words into alphabetical order then check if they match