1# This file is part of the Colobot: Gold Edition source code 2# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam 3# This file is distributed under the same license as the Colobot package. 4# next_ghost <next_ghost@quick.cz>, 2018. 5msgid "" 6msgstr "" 7"Project-Id-Version: 0.1.11\n" 8"POT-Creation-Date: DATE\n" 9"PO-Revision-Date: 2018-03-07 23:37+01\n" 10"Last-Translator: next_ghost <next_ghost@quick.cz>\n" 11"Language-Team: Czech <next_ghost@quick.cz>\n" 12"Language: Czech\n" 13"MIME-Version: 1.0\n" 14"Content-Type: text/plain; charset=UTF-8\n" 15"Content-Transfer-Encoding: 8bit\n" 16"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" 17"X-Language: cs_CZ\n" 18"X-Source-Language: en_US\n" 19 20#. type: Title-text 21#: ../scene.txt:1 22#, no-wrap 23msgid "Fighter Jet 2" 24msgstr "Stíhačka 2" 25 26#. type: Resume-text 27#: ../scene.txt:2 28#, no-wrap 29msgid "Adapt the program to a mountainous terrain." 30msgstr "Upravte program pro kopcovitý terén." 31 32#. type: ScriptName-text 33#: ../scene.txt:3 34#, no-wrap 35msgid "Move" 36msgstr "Stihacka2" 37 38#. type: \b; header 39#: ../help/help.E.txt:1 40#, no-wrap 41msgid "Objective" 42msgstr "Úkol" 43 44#. type: Plain text 45#: ../help/help.E.txt:2 46#, no-wrap 47msgid "Adapt the flying height of the <a object|botfj>winged shooter</a> to the terrain." 48msgstr "Přizpůsobte letovou výšku <a object|botfj>létajícího kanónu</a> okolnímu terénu." 49 50#. type: \t; header 51#: ../help/help.E.txt:4 52#, no-wrap 53msgid "Program" 54msgstr "Program" 55 56#. type: Plain text 57#: ../help/help.E.txt:5 58#, no-wrap 59msgid "Here is one more time the program of the previous exercise that hunts ants:" 60msgstr "Zde je opět program na likvidaci mravenců z předchozího cvičení:" 61 62#. type: Source code 63#: ../help/help.E.txt:7 64#, no-wrap 65msgid "" 66"extern void object::JetFighter1()\n" 67"{\n" 68"\tobject item;\n" 69"\t\n" 70"\taim(-20);\n" 71"\tjet(0.2);\n" 72"\twhile (position.z < 10)\n" 73"\t{\n" 74"\t\twait(0.2);\n" 75"\t}\n" 76"\tjet(0);\n" 77"\t\n" 78"\twhile (true)\n" 79"\t{\n" 80"\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n" 81"\t\t{\n" 82"\t\t\titem = radar(AlienAnt);\n" 83"\t\t\tturn(direction(item.position));\n" 84"\t\t\tmotor(1,1);\n" 85"\t\t\twait(0.2);\n" 86"\t\t}\n" 87"\t\tfire(1);\n" 88"\t}\n" 89"}" 90msgstr "" 91"extern void object::Stihacka1()\n" 92"{\n" 93"\tobject item;\n" 94"\t\n" 95"\taim(-20);\n" 96"\tjet(0.2);\n" 97"\twhile (position.z < 10)\n" 98"\t{\n" 99"\t\twait(0.2);\n" 100"\t}\n" 101"\tjet(0);\n" 102"\t\n" 103"\twhile (true)\n" 104"\t{\n" 105"\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n" 106"\t\t{\n" 107"\t\t\titem = radar(AlienAnt);\n" 108"\t\t\tturn(direction(item.position));\n" 109"\t\t\tmotor(1,1);\n" 110"\t\t\twait(0.2);\n" 111"\t\t}\n" 112"\t\tfire(1);\n" 113"\t}\n" 114"}" 115 116#. type: Plain text 117#: ../help/help.E.txt:32 118#, no-wrap 119msgid "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 <c/>wait(0.2);<n/> a test to see if the height above ground is too low or too high, and to react accordingly." 120msgstr "Robot celou dobu poletí v nadmořské výšce 10 metrů. Kopcovitý terén v tomto cvičení ale neumožňuje let v této výšce, takže se robot musí terénu přizpůsobit. Nejjednodušší řešení je vložit před příkaz <c/>wait(0.2);<n/> kontrolu, jestli robot neletí příliš nízko nebo vysoko, a podle toho ovládat tryskový motor." 121 122#. type: Plain text 123#: ../help/help.E.txt:34 124#, no-wrap 125msgid "We already saw that <code>position.z</code> gives the altitude above sea level. <code><a cbot|topo>topo</a>(position)</code> 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 <code>position.z-topo(position)</code> is smaller than 6, the bot must climb with <c/>jet(1);<n/>. If <code>position.z-topo(position)</code> is greater than 9, the bot must go down with <c/>jet(-1);<n/>. In order to program these tests, use the instruction <code><a cbot|if>if</a></code>, that executes the instructions in braces only once if the condition is true:" 126msgstr "Už jsme probírali, že <code>position.z</code> udává nadmořskou výšku robota. <code><a cbot|topo>topo</a>(position)</code> udává nadmořskou výšku terénu přímo pod robotem. Pokud chceme, aby robot létal ve výšce 6 až 9 metrů nad zemí, musíme ošetřit následující případy: pokud je <code>position.z-topo(position)</code> menší než 6, robot musí stoupat příkazem <c/>jet(1);<n/>. Pokud je <code>position.z-topo(position)</code> větší než 9, robot musí klesat příkazem <c/>jet(-1);<n/>. Pro naprogramování těchto podmínek použijte příkaz <code><a cbot|if>if</a></code>, který provede příkazy ve složených závorkách pouze jednou, pokud platí daná podmínka:" 127 128#. type: Source code 129#: ../help/help.E.txt:36 130#, no-wrap 131msgid "" 132"\tjet(0);\n" 133"\tif (position.z-topo(position) < 6)\n" 134"\t{\n" 135"\t\tjet(1);\n" 136"\t}\n" 137"\t\n" 138"\tif (position.z-topo(position) > 9)\n" 139"\t{\n" 140"\t\tjet(-1);\n" 141"\t}" 142msgstr "" 143"\tjet(0);\n" 144"\tif (position.z-topo(position) < 6)\n" 145"\t{\n" 146"\t\tjet(1);\n" 147"\t}\n" 148"\t\n" 149"\tif (position.z-topo(position) > 9)\n" 150"\t{\n" 151"\t\tjet(-1);\n" 152"\t}" 153 154#. type: Plain text 155#: ../help/help.E.txt:47 156#, no-wrap 157msgid "Before starting the testing, stabilize the altitude with <c/>jet(0);<n/>: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either <c/>jet(1);<n/> or <c/>jet(-1);<n/> is executed, it will cancel the previous <c/>jet(0);<n/>." 158msgstr "Před oběma podmínkami vyrovnejte výšku příkazem <c/>jet(0);<n/>: pokud je aktuální výška mezi 6 a 9 metry nad zemí, robot nesmí stoupat ani klesat. Když se hned poté provede příkaz <c/>jet(1);<n/> nebo <c/>jet(-1);<n/>, předchozí příkaz <c/>jet(0);<n/> se tím zruší." 159 160#. type: Plain text 161#: ../help/help.E.txt:49 162#, no-wrap 163msgid "Just insert these lines before the <code>wait(0.2)</code>, 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." 164msgstr "Jednoduše vložte výše uvedený kód před příkaz <code>wait(0.2)</code> a robot bude za letu kopírovat terén. Pak můžete smazat cyklus na začátku programu, který robotovi přikazuje vystoupat do výšky 10m." 165 166#. type: \t; header 167#: ../help/help.E.txt:51 168#, no-wrap 169msgid "See also" 170msgstr "Užitečné odkazy" 171 172#. type: Plain text 173#: ../help/help.E.txt:52 174#, no-wrap 175msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>." 176msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>." 177