My goal is to master the techniques for splitting code across multiple files on my Photon project.
For months I’ve been typing away at my project called 21 Days, a habit forming picture frame. Now I have around 1000 lines of code all in one cpp/h file, and I plan to add more. The project has namespaced “global” variables, uses particle libraries and external libraries, and a lot of functions.
My project worked at one point, but I’ve now reorganized everything into a broken state. I’m unsure how to proceed, and unable to find guides or examples.
It would be awesome to come up with a architecture/pattern together for organizing larger Particle projects written in C/C++.
P.S. Some of the global variables (like
habit) are instances of a class that are only constructed once (more or less constant), and others (primarily
state) are mutated all the time.