Press space to swing. You can press the right arrow to go right and you can press the left arrow to go left. Press the green flag after 1 ball.
All the code was by me.