Write code to make the rocket move through the maze using a single key press and without any further user input, e.g. mouse or keyboard control.