Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Build letter K | Challenges
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
Challenge: Build letter K

Welcome to the "Build Letter K" challenge! In this chapter, you'll put your programming skills to the test by constructing the letter "K" using the Ninja Game.

Before you begin, let's quickly recap the ninja methods and features you've learned:

Ninja Methods:

  • goRight(), goLeft(), goUp(), goDown(): Move the ninja one cell in the specified direction.
  • pickSushi(): Pick up sushi from the map and add it to your inventory.
  • putSushi(): Place sushi from your inventory onto a cell.
  • objectUp(), objectDown(), objectRight(), objectLeft(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Tarea
test

Swipe to show code editor

Goal: Build the letter "K" using sushi on the grid.

Use any of the ninja methods and programming concepts you've learned to complete this 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 5. Capítulo 1
js

ninja.js

html

index.html

js

preset.js

toggle bottom row

book
Challenge: Build letter K

Welcome to the "Build Letter K" challenge! In this chapter, you'll put your programming skills to the test by constructing the letter "K" using the Ninja Game.

Before you begin, let's quickly recap the ninja methods and features you've learned:

Ninja Methods:

  • goRight(), goLeft(), goUp(), goDown(): Move the ninja one cell in the specified direction.
  • pickSushi(): Pick up sushi from the map and add it to your inventory.
  • putSushi(): Place sushi from your inventory onto a cell.
  • objectUp(), objectDown(), objectRight(), objectLeft(): Determine the object in the next cell in the specified direction, returning "wall", "sushi", or "empty".

Programming Concepts:

  • Functions: Create reusable blocks of code to perform specific tasks.
  • Decomposition: Break down complex problems into smaller, manageable parts.
  • Loops: Use for and while loops to repeat actions.
  • Conditional Statements: Use if-else statements to make decisions based on conditions.
Tarea
test

Swipe to show code editor

Goal: Build the letter "K" using sushi on the grid.

Use any of the ninja methods and programming concepts you've learned to complete this 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 5. Capítulo 1
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