I went back and looked at my Tetris code and thought it could be so much better. So i ended up reading a bit more on different algorithms and came with the idea that i could make a engine were different algorithms could be injected, and at the same time use it headless and within unity.

It contains all basic rules, with rules similar to the gameboy version.

tetris-term

Code can be found on Github