Hi there, I've been learning C++ for a month now and this is the third project I've worked on. This is the first project I've worked on with lots of files. I tried to make the code as organised and readable as possible, but this is my first time managing files like this so it may not be entirely up to scratch. If you have any feedback for me (even if you just give the project a quick flip through) it would be greatly appreciated! Here is the Github link: https://github.com/Lewis-Pitman/Tetris
#Tetris in terminal
17 messages ยท Page 1 of 1 (latest)
woah!
Love me some Tetris
.exe files are usually not stored in the repository. There is a releases feature for this in github
Includes folder is usually for only header files ( .hpp)
Depends on winapi, so can't test unfortunately ๐๐ญ
I don't like the use of global variables... ๐
Should global variables be kept inside the header file they relate to?
I think my reasoning for the global variables was because I didn't want to include every header file in every file
But I think I kind of ended up doing that anyway
Uhmm for example in main you have an array of placed blocks, game active, and so on
I think they belong as member variables of the Game class
Yeah
I think placed blocks being in main was just to initialise it but I could have done that in the screen constructor or game constructor
The BlockData class with the 4d array is another thing I kind of really don't like.
Uhmm any way, great job ๐๐ you only learned for 1 month and basically made a finished product that works. ๐๐๐ซ๐ฅณ๐ฅณ๐ค๐
Thanks!