Tetris implemented on a canvas with javascript