I just finished writing an ncurses-based Tetris clone in C. It’s only my second project of this size, the first being a Snake clone. I would really appreciate any and all suggestions/improvements as I’m relatively new to C and I would like to improve.
As this is a 300-plus-line codebase, anything I can add to this question to more easily facilitate its review will be added upon request.
The code is located here.
For this code to properly function on macOS, you must compile it with
-D_XOPEN_SOURCE_EXTENDED -lncurses. On Linux, you must compile it with
-lncursesw. This is due to its usage of wide characters.