Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Practice. Pick and Move to the Sushi Center of the Box | Basic Controls
Ninja Game
course content

Contenido del Curso

Ninja Game

Ninja Game

1. Basic Controls
2. Functions
3. Loops
4. If-Else Statements
5. Challenges

book
Practice. Pick and Move to the Sushi Center of the Box

In this chapter, you'll get tasked with picking up sushi and moving it to a designated spot.

Let's quickly recap the methods you'll be using:

  • pickSushi(): This method allows the ninja to pick up sushi from the current cell and add it to the inventory.
  • putSushi(): This method enables the ninja to place sushi from the inventory onto the current cell.

Here's an example of how you might move a ninja to pick up a sushi and place it in a new location:

js

ninja.js

html

index.html

js

preset.js

copy
Tarea
test

Swipe to show code editor

Goal: Collect sushi and place it in the center of the box.

In this exercise, you'll see two maps below task. The first map shows the starting position of the sushi, and the second map indicates where you need to place the sushi.

Use the methods pickSushi() and putSushi() to complete the task.

Solución

Starter Map

Goal Map

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 3
js

ninja.js

html

index.html

js

preset.js

toggle bottom row

book
Practice. Pick and Move to the Sushi Center of the Box

In this chapter, you'll get tasked with picking up sushi and moving it to a designated spot.

Let's quickly recap the methods you'll be using:

  • pickSushi(): This method allows the ninja to pick up sushi from the current cell and add it to the inventory.
  • putSushi(): This method enables the ninja to place sushi from the inventory onto the current cell.

Here's an example of how you might move a ninja to pick up a sushi and place it in a new location:

js

ninja.js

html

index.html

js

preset.js

copy
Tarea
test

Swipe to show code editor

Goal: Collect sushi and place it in the center of the box.

In this exercise, you'll see two maps below task. The first map shows the starting position of the sushi, and the second map indicates where you need to place the sushi.

Use the methods pickSushi() and putSushi() to complete the task.

Solución

Starter Map

Goal Map

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 3
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt