Skip to content

Instantly share code, notes, and snippets.

@a1ip
Last active June 8, 2020 00:05
Show Gist options
  • Save a1ip/953f63308c7a1aedc30fbcaa7bb62d36 to your computer and use it in GitHub Desktop.
Save a1ip/953f63308c7a1aedc30fbcaa7bb62d36 to your computer and use it in GitHub Desktop.
Решения для обучающей игры Blockly «Птица» https://git.io/blockly-bird Остальные игры: https://git.io/blockly

Blockly Games logo

Лого игры Blockly «Птица»

heading(45);

if (noWorm()) {
  heading(0);
} else {
  heading(90);
}

if (noWorm()) {
  heading(300);
} else {
  heading(60);
}

if (getX() < 80) {
  heading(0);
} else {
  heading(270);
}

if (getY() > 20) {
  heading(270);
} else {
  heading(180);
}

if (noWorm()) {
  heading(345);
} else if (getY() < 80) {
  heading(120);
} else {
  heading(180);
}

if (getY() > 50) {
  heading(225);
} else if (noWorm()) {
  heading(315);
} else {
  heading(180);
}

if (getX() < 50) {
  heading(45);
} else if (noWorm()) {
  heading(315);
} else if (getY() < 50) {
  heading(135);
} else {
  heading(45);
}

if (getX() > 20 && noWorm()) {
  heading(195);
} else if (noWorm()) {
  heading(270);
} else if (getY() < 75 && getX() < 21) {
  heading(90);
} else if (getX() < 50) {
  heading(0);
} else {
  heading(300);
}

if (noWorm() && getX() < 42) {
  heading(72);
} else if (noWorm()) {
  heading(315);
} else if (getX() > 35) {
  heading(135);
} else {
  heading(260);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment