Blockly games птица решение

How to solve (solution) Google’s Blockly Future Programmers Game: Bird Level

Carlos Delgado

Learn how to solve all the levels of the Google’s Blockly Maze (introduction to loops and conditionals).

How to solve (solution) Google's Blockly Future Programmers Game: Bird Level

Google’s Blockly Games is a series of educational games that teach programming. It is based on the Blockly library. All code is free and open source. The Bird Game is a deep-dive into conditionals. Control-flow is explored with increasingly complex conditions. The game engine and source is available as an open source project at Github here.

In this article we’ll share with you the solution to all 10 levels available in the Bird Game of Blockly.

Level #1

Google

The respective JavaScript code of this level is:

Level #2

Google

The respective JavaScript code of this level is:

Level #3

Google

The respective JavaScript code of this level is:

Level #4

Google

The respective JavaScript code of this level is:

Level #5

Google

The respective JavaScript code of this level is:

Level #6

Google

The respective JavaScript code of this level is:

if (noWorm()) < heading(345); >else if (getY() < 80) < heading(90); >else

Level #7

Google

The respective JavaScript code of this level is:

if (getY() > 50) < heading(225); >else if (noWorm()) < heading(300); >else

Level #8

Google

The respective JavaScript code of this level is:

if (getY() < 40) < heading(90); >else if (noWorm()) < heading(345); >else if (getX() > 50 && getY() < 50) < heading(180); >else

Level #9

Google

The respective JavaScript code of this level is:

if (noWorm() && getX() > 20) < heading(180); >else if (noWorm() && getY() > 20) < heading(270); >else if (getY() < 70 && getX() < 40) < heading(90); >else

Level #10

Google

The respective JavaScript code of this level is:

if (noWorm() && getY() < 80 && getX() < 30) < heading(90); >else if (noWorm() && getX() < 80) < heading(0); >else if (noWorm() && getY() > 50) < heading(270); >else if (getY() < 80 && getX() >20) < heading(90); >else if (getX() > 20) < heading(180); >else if (getY() > 20)

Источник

Читайте также:  Блюда из отварной птицы ттк
Оцените статью