#Tetris in terminal

17 messages ยท Page 1 of 1 (latest)

neat agate
#

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

GitHub

Tetris in Windows terminal written in C++. Contribute to Lewis-Pitman/Tetris development by creating an account on GitHub.

granite tusk
#

woah!

cunning pivot
#

Love me some Tetris

tidal urchin
#

.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)

tidal urchin
#

Depends on winapi, so can't test unfortunately ๐Ÿ˜ž๐Ÿ˜ญ

#

I don't like the use of global variables... ๐Ÿ˜•

neat agate
#

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

tidal urchin
#

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

neat agate
#

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

tidal urchin
#

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. ๐Ÿ˜ƒ๐Ÿ˜ƒ๐Ÿ’ซ๐Ÿฅณ๐Ÿฅณ๐Ÿค˜๐Ÿ“ˆ

neat agate
#

Thanks!