Write code to make the beetle move through the maze without any user input, e.g. mouse or keyboard control.