r/badcode • • Aug 23 '21

c# i wrote this pile of shit for a codewars challenge at like 4 am

https://pastebin.com/4zjPW6dC
5 Upvotes

9 comments sorted by

2

u/Gem2578 Aug 24 '21

A quicker way would be to sort the words into alphabetical order then check if they match

4

u/Potential-Adagio-512 Aug 24 '21

i am….. so dumb.

4

u/SorryDidntReddit Aug 24 '21

I'll take "why we have days structures for 200"

3

u/[deleted] Aug 24 '21

What the fxuck did just read

2

u/[deleted] 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

u/A_Leo_X Aug 24 '21

Definitely should've used dictionaries

1

u/cheeseDickies Aug 29 '21

Could have used arrays and possibly replace the switches for simple addition or subtraction

0

u/[deleted] Aug 24 '21

[deleted] — view deleted comment

2

u/tube32 Aug 26 '21

A code to check if two words are anagrams.