Tetris engine