# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2014-07-02 12:51+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: One-char language identifier #: train202.languagecode:1 #, no-wrap msgid "E" msgstr "R" #. type: Title-text #: train202/scene.txt:1 #, no-wrap msgid "train202:Flying tower 1" msgstr "train202:Летающая башня 1" #. type: Resume-text #: train202/scene.txt:2 #, no-wrap msgid "train202:Make a flying defense tower out of a winged shooter." msgstr "train202:Создайте летающую защитную крепость из крылатого стрелка." #. type: ScriptName-text #: train202/scene.txt:3 #, no-wrap msgid "train202:Move" msgstr "train202:Move" #. type: \b; header #: train202-help/tant2.txt:1 #, fuzzy, no-wrap msgid "Objective" msgstr "Задание" #. type: Plain text #: train202-help/tant2.txt:3 #, fuzzy, no-wrap msgid "As a defense against ants attacking from all sides, adapt the program Spider2 in order to fly at a given altitude." msgstr "Примените в качестве защиты при нападении муравьев со всех сторон программу Spider2, чтобы иметь возможность лететь на заданной высоте." #. type: \t; header #: train202-help/tant2.txt:4 #, fuzzy, no-wrap msgid "Program" msgstr "Программа" #. type: Plain text #: train202-help/tant2.txt:6 #, fuzzy, no-wrap msgid "The program necessary for this task is somewhat similar to the program Spider2 that looks for the closest ant, turns towards it and fires:" msgstr "Программа, необходимая для выполнения этой задачи, чем-то напоминает программу Spider2, которая ищет ближайшего муравья, поворачивает бота ему навстречу и стреляет из пушки:" #. type: \s; block (usually verbatim code) #: train202-help/tant2.txt:18 #, fuzzy, no-wrap msgid "" "extern void object::Spider2()\n" "{\t\n" "\tobject item;\n" "\t\n" "\twhile (true)\n" "\t{\n" "\t\titem = radar(AlienSpider);\n" "\t\tturn(direction(item.position));\n" "\t\tfire(1);\n" "\t}\n" "}" msgstr "" "extern void object::Spider2()\n" "{\t\n" "\tobject item;\n" "\t\n" "\twhile (true)\n" "\t{\n" "\t\titem = radar(AlienSpider);\n" "\t\tturn(direction(item.position));\n" "\t\tfire(1);\n" "\t}\n" "}" #. type: Plain text #: train202-help/tant2.txt:20 #, fuzzy, no-wrap msgid "You can copy-paste it to the editor, and adapt it. Replace radar(AlienSpider); by radar(AlienAnt);, and write before the while loop another loop that activates the jet beneath the winged shooter until the bot reaches an altitude of 20 meters." msgstr "Вы можете копировать-вставить ее редактор, и запустить. Замените radar(AlienSpider); на radar(AlienAnt);, и напишите перед циклом while еще один цикл, активирующий под крылатым стрелком реактивный двигатель, пока бот не наберет высоту 20 мметров." #. type: Plain text #: train202-help/tant2.txt:22 #, fuzzy, no-wrap msgid "The instruction jet() controls the jet beneath winged bots. The number in brackets must range between -1 and 1. jet(1); moves the bot upward with maximum speed. jet(-1); moves the bot downward with maximum speed, and jet(0); stabilizes the altitude. As the bot must reach a precise altitude, move it upward slowly with jet(0.2);, wait until it has reached the desired height, then stabilize the altitude with jet(0);." msgstr "Инструкция jet() управляет двигателем под крылатыми ботами. Число в кавычках должно быть между -1 и 1. jet(1); перемещает бота вверх с максимальной скоростью. jet(-1); перемещает бота с максимальной скоростью вниз, а jet(0); стабилизирует высоту. Так как боту необходимо набрать определенную высоту, медленно поднимите его вверх с jet(0.2);, подождите, пока он наберет желаемую высоту, а после этого стабилизируйте его с помощью команды jet(0);." #. type: Plain text #: train202-help/tant2.txt:24 #, fuzzy, no-wrap msgid "In order to \"wait until it has reached the desired height\", we need a conditional loop: the instructions inside the loop will be repeated only as long as a certain condition is true. The altitude of the bot is given by position.z. We already saw that position gives the position of the bot. And a position is given by the three coordinates x, y and z: the x-axis is the axis west-east, the y-axis is the axis south-north, and the z-axis is the vertical axis. Therefore we must wait while position.z is smaller than 20:" msgstr "Чтобы \"подождать, пока он наберет желаемую высоту\", нам нужен цикл с условием: инструкции внутри цикла будут повторяться до того времени, пока определенное условие будет истинным. Высота бота определяется position.z. Мы уже видели, что position задает позицию бота. Позиция задается тремя координатами x, y и z: ось x - это ось запад-восток, ось y - ось юг-север, а ось z - это вертикальная ось. Поэтому мы должны подождать, пока position.z будет меньше 20 метров:" #. type: \s; block (usually verbatim code) #: train202-help/tant2.txt:29 #, fuzzy, no-wrap msgid "" "\twhile (position.z < 20)\n" "\t{\n" "\t\twait(0.2);\n" "\t}" msgstr "" "\twhile (position.z < 20)\n" "\t{\n" "\t\twait(0.2);\n" "\t}" #. type: Plain text #: train202-help/tant2.txt:31 #, fuzzy, no-wrap msgid "After waiting 0.2 seconds, the program will check if the altitude is still below 20 meters. If this is the case, it will wait a little more, if not, the program continues after the loop, i.e. after the closing brace }. Do not forget after the loop to stabilize the altitude with jet(0);." msgstr "После задержки в 0.2 секунды программа проверит, какова высота бота над поверхностью, и не находится ли он ниже 20 метров. Если это так, она подождет еще немного, а если нет, программа будет продолжена после цикла, то есть после закрывающей скобки }. Не забудьте после цикла стабилизировать высоту jet(0);." #. type: \t; header #: train202-help/tant2.txt:32 #, fuzzy, no-wrap msgid "See also" msgstr "См. также" #. type: Plain text #: train202-help/tant2.txt:33 #, fuzzy, no-wrap msgid "Programming, types and categories." msgstr "Программирование, типы и категории."