There are a few ways to refactor a messy project, but the some of the easiest are:
- 00:37 Move classes into separate files
- 06:04 Move utility functions into separate file
- 08:08 Move event listeners into separate file
- 10:09 Move game setup into separate file
- 15:25 Abstract beefy groupings of code into their own statements
Here you'll see how we can transform the current, messy state of our code into something that's much more manageable.
If you'd like a written version of what's covered here, I wrote a quick article on just that: https://chriscourses.com/blog/how-to-refactor-messy-javascript-projects
finally came back!