PASO 5: Sigamos configurando el juego. ¡A continuación, debemos agregar un jugador que controlarás!

  • Ir a y arrastre Define Function . Colócalo entre set_stage() y main() .
  • Cambie el nombre de la nueva función a add_player() . ¡Asegúrese de que la definición de la nueva función no esté sangrada!
  • A continuación, arrastre Docstring a la nueva función para que esté sangrado en la primera línea.
  • Edite la cadena de documentación para decir """ Adds a player to the stage for the user to control """ .

To navigate the page using the TAB key, first press ESC to exit the code editor.

def set_stage(): """ Sets up the stage for the game """ stage.set_background("soccerfield") stage.disable_floor() def main(): """ Sets up the program and calls other functions """ set_stage() main()
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)