# 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. # # 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 #: train205.languagecode:1 #, no-wrap msgid "E" msgstr "P" #. type: Title-text #: train205/scene.txt:1 #, no-wrap msgid "train205:Fighter Jet 2" msgstr "train205:Walka powietrzna 2" #. type: Resume-text #: train205/scene.txt:2 #, no-wrap msgid "train205:Adapt the program to a mountainous terrain." msgstr "train205:Przystosuj program do górzystego terenu." #. type: ScriptName-text #: train205/scene.txt:3 #, no-wrap msgid "train205:Move" msgstr "train205:Poruszanie" #. type: \b; header #: train205-help/tant5.txt:1 #, no-wrap msgid "Objective" msgstr "Zadanie" #. type: Plain text #: train205-help/tant5.txt:3 #, no-wrap msgid "Adapt the flying height of the winged shooter to the terrain." msgstr "Przystosuj wysokość lotu działa latającego do terenu." #. type: \t; header #: train205-help/tant5.txt:4 #, no-wrap msgid "Program" msgstr "Program" #. type: Plain text #: train205-help/tant5.txt:6 #, no-wrap msgid "Here is one more time the program of the previous exercise that hunts ants:" msgstr "Oto jeszcze raz program polujący na mrówki z poprzedniego ćwiczenia:" #. type: \s; block (usually verbatim code) #: train205-help/tant5.txt:31 #, no-wrap msgid "" "extern void object::JetFighter1()\n" "{\n" "\tobject item;\n" "\t\n" "\taim(-20);\n" "\tjet(0.2);\n" "\twhile (position.z < 10)\n" "\t{\n" "\t\twait(0.2);\n" "\t}\n" "\tjet(0);\n" "\t\n" "\twhile (true)\n" "\t{\n" "\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n" "\t\t{\n" "\t\t\titem = radar(AlienAnt);\n" "\t\t\tturn(direction(item.position));\n" "\t\t\tmotor(1,1);\n" "\t\t\twait(0.2);\n" "\t\t}\n" "\t\tfire(1);\n" "\t}\n" "}" msgstr "" "extern void object::JetFighter1()\n" "{\n" "\tobject item;\n" "\t\n" "\taim(-20);\n" "\tjet(0.2);\n" "\twhile (position.z < 10)\n" "\t{\n" "\t\twait(0.2);\n" "\t}\n" "\tjet(0);\n" "\t\n" "\twhile (true)\n" "\t{\n" "\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n" "\t\t{\n" "\t\t\titem = radar(AlienAnt);\n" "\t\t\tturn(direction(item.position));\n" "\t\t\tmotor(1,1);\n" "\t\t\twait(0.2);\n" "\t\t}\n" "\t\tfire(1);\n" "\t}\n" "}" #. type: Plain text #: train205-help/tant5.txt:33 #, no-wrap msgid "The bot always stays at an altitude of 10m above sea level. This is not adapted to the mountainous terrain of the present exercise, the bot has got to adapt to the terrain. The best way to do so is to insert just before the wait(0.2); a test to see if the height above ground is too low or too high, and to react accordingly." msgstr "Robot zawsze utrzymuje wysokość 10 m nad poziomem morza. Nie jest on przystosowany do górzystego terenu w tym ćwiczeniu. Najlepszym sposobem przystosowania programu jest wstawienie przed instrukcją wait(0.2); testu sprawdzającego czy wysokość nad poziomem ziemi jest za mała lub za duża i odpowiednie reagowanie." #. type: Plain text #: train205-help/tant5.txt:35 #, no-wrap msgid "We already saw that position.z gives the altitude above sea level. topo(position) gives the altitude of the ground at the position of the bot. If we want the bot to stay at an altitude between 6 and 9m above ground, we must treat the following cases: if position.z-topo(position) is smaller than 6, the bot must climb with jet(1);. If position.z-topo(position) is greater than 9, the bot must go down with jet(-1);. In order to program these tests, use the instruction if, that executes the instructions in braces only once if the condition is true:" msgstr "Wiesz już że instrukcja position.z podaje wysokość nad poziomem morza. Instrukcja topo(position) podaje wysokość nad poziomem ziemi w pozycji robota. Jeśli chcesz, aby robot utrzymywał wysokość pomiędzy 6 i 9 m nad ziemią, należy rozpatrzyć następujące przypadki: jeśli position.z-topo(position) jest mniejsze od 6, robot musi się wznieść: jet(1);. Jeśli position.z-topo(position) jest większe od 9, robot musi zmniejszyć wysokość: jet(-1);. Aby zaprogramować te testy, użyj instrukcji if, która wykonuje instrukcje w klamrach jedynie wtedy gdy warunek jest prawdziwy:" #. type: \s; block (usually verbatim code) #: train205-help/tant5.txt:46 #, no-wrap msgid "" "\tjet(0);\n" "\tif (position.z-topo(position) < 6)\n" "\t{\n" "\t\tjet(1);\n" "\t}\n" "\t\n" "\tif (position.z-topo(position) > 9)\n" "\t{\n" "\t\tjet(-1);\n" "\t}" msgstr "" "\tjet(0);\n" "\tif (position.z-topo(position) < 6)\n" "\t{\n" "\t\tjet(1);\n" "\t}\n" "\t\n" "\tif (position.z-topo(position) > 9)\n" "\t{\n" "\t\tjet(-1);\n" "\t}" #. type: Plain text #: train205-help/tant5.txt:48 #, no-wrap msgid "Before starting the testing, stabilize the altitude with jet(0);: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either jet(1); or jet(-1); is executed, it will cancel the previous jet(0);." msgstr "Przed rozpoczęciem testowania, ustabilizuj wysokość instrukcją jet(0);: w przypadku wysokości nad poziomem ziemi pomiędzy 6 i 9 m, robot nie musi zmieniać wysokości lotu. Jeśli później zostanie wykonana instrukcja jet(1); lub jet(-1); anuluje ona poprzednią instrukcję jet(0);." #. type: Plain text #: train205-help/tant5.txt:50 #, no-wrap msgid "Just insert these lines before the wait(0.2), and the bot will adapt to the terrain. You can then delete the first lines of the program that set the initial altitude at 10m." msgstr "Wystarczy wstawić te linie przed instrukcją wait(0.2), a robot przystosuje się do terenu. Możesz już usunąć pierwszą linię programu ustawiającą wysokość początkową na 10 m." #. type: \t; header #: train205-help/tant5.txt:51 #, no-wrap msgid "See also" msgstr "Zobacz również" #. type: Plain text #: train205-help/tant5.txt:52 #, no-wrap msgid "Programming, types and categories." msgstr "Programowanie, typy i kategorie."