Use up key to move up. Use down key to move. you might want to move up as soon as you press green because you will touch the obstacles and lose.
I made this project using the idea of 'helicopter game' turning it to a mini flappy bird.