If reading about Tetris made you want to play it (again), here's a BSD-licensed implementation of a falling-blocks game that might be similar to Tetris: https://github.com/zeromeaner/zeromeaner
(Zeromeaner is a fork of NullpoMino since the latter hasn't been updated for several years.)