Drag your mouse to where you want to place the block, then click.
Look at the code, only the sprite designing is hard.