Use the left and right arrow keys or the A and D key to move.
All code by me. Please tell me anything that you might want me to add to the game.