DEV Community

Discussion on: Roast the code #1 | Rock Paper Scissors

Collapse
 
nombrekeff profile image
Keff

Fair enough, and I totally agree!

I have no excuse, but If I'm honest safety is something I take quite seriously on real projects, this one was more of a fun project. I did it a while back and after reading your comment I remember that I left wanting to work on that part. Might need to consider the order in which I do these things though!

The complexity part was kind of intentional, I made a really simple version first, and I then decided to do it in that way as to make it more extensible. My idea was to allow for rules, UI's and AI's to be built without much need to change the code. For example, having different levels of AI, ranging from simple (random picks) to more complex AI's, maybe using machine learning and so on. If I had taken a bit more time I might've come up with something simpler, but I got bored 😅

What parts would you say are overly complex?

Would you mind elaborating on what you mean by hard to test? And how would you say it could be improved?

Collapse
 
willypuzzle profile image
Domenico Rizzo

I think generalization, interfaces and abstract classes are always a good idea. The project it's not perfect I agree but you put the basics to further developments

Thread Thread
 
nombrekeff profile image
Keff

Yeah, it was never intended to be perfect, otherwise the whole point of the post would be lost! I don't know if there is such think as perfect code to be honest, code evolves over time and improves continuously, so I hope more people like you come on board and help improve it even more, so we can all learn and improve together! Thanks again for the PR