While the code in this project isn't super great in general - this mucked up piece of garbage that handles the main server side logic of the game needs a serious refactor:
Some thoughts I have had include compressing it to a switch statement or assigning local variables which get passed dynamically to the different if cases.
I'll probably get around to it eventually but anyone should feel welcome to take a stab if they see this.
While the code in this project isn't super great in general - this mucked up piece of garbage that handles the main server side logic of the game needs a serious refactor:
https://github.com/rfaile313/cavatars-game/blob/a18005f36a22c68039a1c0d69973b234210f7c8f/server/server.js#L271-L380
Some thoughts I have had include compressing it to a switch statement or assigning local variables which get passed dynamically to the different
if
cases.I'll probably get around to it eventually but anyone should feel welcome to take a stab if they see this.