good afternoon. I'm looking for a mentor in code. There are ready-made files, ready-made code. It is necessary to issue the code to the library. Optimize the code.
students should learn the basics of the C ++ language to make the simplest games (pong, snake, tetris)
Please do not scold me for placing all the code in header files. Initially, I did it for myself, and then it went - it went))) I understand that I need to rewrite.
mmmm.. students are more interested in working with a handheld console than with a prototyping board. Thus, they have a finished product in their hands that needs to be programmed in such a way that the game would turn out.
Here are some superficial (sometimes opinionated) remarks I wrote down while browsing through your project, I did not look at the structure or functionality of the code.
Version control:
Use descriptive commit messages.
Do not check in local preferences like those in .DS_Store.
Code:
Enable all compiler warnings and extra flags like -pedantic, fix all warnings (some seem to be rather serious).
A comma after the last element in an initialiser list is redundant.
Avoid #define, use const variables instead.
Avoid uninformative comments like /* include */.
Avoid constructs like else return false; at the end of a function or method, simply return false;.
Be consistent when initialising variables (int x = 10; vs. int x {10};). If you have a choice, prefer the latter.
Use informative variables names, so not lii, but lineInterval.
Use size_t for array and string sizes.
Do not check in commented out code.
Be consistent with indentation (e.g., private: is not indented in one file, but it is in an other.
PROGMEM only works for static or global variables, check the drawLogo() method.