Translate exercises chapter 4
parent
a29a252fe0
commit
2fb1d28181
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
|
@ -0,0 +1,280 @@
|
|||
# This file is part of the Colobot: Gold Edition source code
|
||||
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
# This file is distributed under the same license as the Colobot package.
|
||||
# next_ghost <next_ghost@quick.cz>, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1.11\n"
|
||||
"POT-Creation-Date: DATE\n"
|
||||
"PO-Revision-Date: 2018-03-17 19:18+01\n"
|
||||
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
||||
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
||||
"Language: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
||||
"X-Language: cs_CZ\n"
|
||||
"X-Source-Language: en_US\n"
|
||||
|
||||
#. type: Title-text, ScriptName-text
|
||||
#: ../scene.txt:1 ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Dragster"
|
||||
msgstr "Sprint"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Program a progressive deceleration in order to avoid the mines right behind the goal."
|
||||
msgstr "Naprogramujte postupné brždění, aby robot nenajel na miny za cílem."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Exercise"
|
||||
msgstr "Cvičení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "Reach the finishing pad (25m in front of you) as fast as possible, using the instruction <code>motor( , )</code>. You will have to slow down progressively at the end of the move, otherwise the bot will get blown up on the <a object|mine>mines</a>."
|
||||
msgstr "Co nejrychleji dojeďte na cílovou značku (25m před robotem) pomocí příkazu <code>motor( , )</code>. Na konci dráhy budete muset postupně zpomalovat, jinak robot najede na <a object|mine>miny</a> za cílem."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:4
|
||||
#, no-wrap
|
||||
msgid "You could very well write no more than <c/><a cbot|move>move</a>(25);<n/>, this would work perfectly well. However, the aim of this exercise is to learn how to use the instruction <code><a cbot|motor>motor</a></code>."
|
||||
msgstr "Místo toho byste mohli napsat prostě jen <c/><a cbot|move>move</a>(25);<n/>, to by fungovalo stejně dobře. Jenže cílem tohoto cvičení je naučit se používat příkaz <code><a cbot|motor>motor</a></code>."
|
||||
|
||||
#. type: Bullet: '1)'
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "The speed of the left-hand motor."
|
||||
msgstr "Výkon levého motoru."
|
||||
|
||||
#. type: Bullet: '2)'
|
||||
#: ../help/help.E.txt:8
|
||||
#, no-wrap
|
||||
msgid "The speed of the right-hand motor."
|
||||
msgstr "Výkon pravého motoru."
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:10
|
||||
#, no-wrap
|
||||
msgid "<c/>\tmotor( left, right );"
|
||||
msgstr "<c/>\tmotor( left, right );"
|
||||
|
||||
#. type: Bullet: '-'
|
||||
#: ../help/help.E.txt:13
|
||||
#, no-wrap
|
||||
msgid "1 = full throttle backward"
|
||||
msgstr "1 = plnou rychlostí couvat"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:14
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" 0 = stop\n"
|
||||
" 1 = full throttle forward"
|
||||
msgstr ""
|
||||
" 0 = zastavit\n"
|
||||
" 1 = plnou rychlostí vpřed"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:17
|
||||
#, no-wrap
|
||||
msgid "For example, <c/>motor(0.5, 0.5);<n/> will move the motor forward with half-speed, until new instructions are given to the motors."
|
||||
msgstr "Například <c/>motor(0.5, 0.5);<n/> spustí oba motory vpřed na poloviční výkon, dokud nezměníte výkon motorů jiným příkazem."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:19
|
||||
#, no-wrap
|
||||
msgid "With the instruction <c/>motor(0.5, 0.6);<n/>, the bot will move forward with half-speed, turning at the same time slightly to the left: the right-hand motor moves a little faster (<code>0.6</code>) than the left-hand motor (<code>0.5</code>)."
|
||||
msgstr "Po příkazu <c/>motor(0.5, 0.6);<n/> pojede robot vpřed poloviční rychlostí a bude mírně zatáčet doleva: pravý motor poběží rychleji (<code>0.6</code>) než levý motor (<code>0.5</code>)."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:21
|
||||
#, no-wrap
|
||||
msgid "General principle"
|
||||
msgstr "Obecný postup"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:22
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"In order to move forward for exactly 25 meters and not more, you must move full speed during the first 23 meters, then reduce the speed of the motors progressively during the last two meters.\n"
|
||||
"The <a cbot|var>variable</a> <a cbot|object>position</a> gives you at any moment the current position of the bot, and the instruction <c/><a cbot|dist>distance</a>( , );<n/> returns the distance between two points. The best way to know where you are consists in saving the current position before the start into a <a cbot|var>variable</a>, for example a variable called <code>start</code>. Then you can calculate the distance between the starting position and your current position with <code>distance(position, start)</code>."
|
||||
msgstr ""
|
||||
"Abyste ujeli přesně 25 metrů a ne více, musíte jet plnou rychlostí jen prvních 23 metrů, a pak na posledních dvou metrech postupně snižovat rychlost.\n"
|
||||
"<a cbot|var>Proměnná</a> <a cbot|object>position</a> udává vždy aktuální polohu robota a příkaz <c/><a cbot|dist>distance</a>( , );<n/> vrací vzdálenost mezi dvěma body. Jakou vzdálenost jste už ujeli můžete nejlépe zjistit tak, že si na začátku uložíte startovní polohu robota do <a cbot|var>proměnné</a>, kterou nazveme například <code>start</code>. Pak můžete spočítat vzdálenost mezi startovní polohou a aktuální polohou příkazem <code>distance(position, start)</code>."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:25
|
||||
#, no-wrap
|
||||
msgid "The program"
|
||||
msgstr "Program"
|
||||
|
||||
#. type: Bullet: '1)'
|
||||
#: ../help/help.E.txt:26
|
||||
#, no-wrap
|
||||
msgid "declare the variables"
|
||||
msgstr "Deklarujte proměnné"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:27
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>\tpoint start;\n"
|
||||
"\tfloat len;"
|
||||
msgstr ""
|
||||
"<c/>\tpoint start;\n"
|
||||
"\tfloat len;"
|
||||
|
||||
#. type: Bullet: '2)'
|
||||
#: ../help/help.E.txt:30
|
||||
#, no-wrap
|
||||
msgid "save the starting position"
|
||||
msgstr "Uložte si startovní polohu"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:31
|
||||
#, no-wrap
|
||||
msgid "<c/>\tstart = position;"
|
||||
msgstr "<c/>\tstart = position;"
|
||||
|
||||
#. type: Bullet: '3)'
|
||||
#: ../help/help.E.txt:33
|
||||
#, no-wrap
|
||||
msgid "start full throttle :"
|
||||
msgstr "Rozjeďte se plnou rychlostí:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:34
|
||||
#, no-wrap
|
||||
msgid "<c/>\tmotor(1, 1);"
|
||||
msgstr "<c/>\tmotor(1, 1);"
|
||||
|
||||
#. type: Bullet: '4)'
|
||||
#: ../help/help.E.txt:36
|
||||
#, no-wrap
|
||||
msgid "Perform an infinite <code><a cbot|while>while</a></code> loop:"
|
||||
msgstr "Opakujte v nekonečném cyklu <code><a cbot|while>while</a></code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:37
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>\twhile ( true )\n"
|
||||
"\t{\n"
|
||||
"\t\tlen = distance(position, start);\n"
|
||||
"\t\tif ( len > 25-2 )\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\tmotor( less than before ! );\n"
|
||||
"\t\t}\n"
|
||||
"\t}"
|
||||
msgstr ""
|
||||
"<c/>\twhile ( true )\n"
|
||||
"\t{\n"
|
||||
"\t\tlen = distance(position, start);\n"
|
||||
"\t\tif ( len > 25-2 )\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\tmotor( pomaleji než při minulém volání! );\n"
|
||||
"\t\t}\n"
|
||||
"\t}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:46
|
||||
#, no-wrap
|
||||
msgid "As long as the distance between the start and the current position is smaller than 23m, the instruction in braces after the <code><a cbot|if>if</a></code> instruction will not be executed, so the motors keep their maximum speed as they were told by the <c/><a cbot|motor>motor</a>(1,1);<n/> instruction."
|
||||
msgstr "Dokud bude vzdálenost od startovní pozice menší než 23 metrů, příkazy ve složených závorkách za příkazem <code><a cbot|if>if</a></code> se budou přeskakovat, takže motory poběží na plný výkon dle příkazu <c/><a cbot|motor>motor</a>(1,1);<n/> na začátku programu."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:49
|
||||
#, no-wrap
|
||||
msgid "<code>2.0</code> meters left -> speed = <code>1.00</code> (maximum)"
|
||||
msgstr "Když zbývají <code>2.0</code> metry -> rychlost = <code>1.00</code> (maximum)"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:50
|
||||
#, no-wrap
|
||||
msgid "<code>1.5</code> meters left -> speed = <code>0.75</code>"
|
||||
msgstr "Když zbývá <code>1.5</code> metru -> rychlost = <code>0.75</code>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:51
|
||||
#, no-wrap
|
||||
msgid "<code>1.0</code> meter left -> speed = <code>0.50</code>"
|
||||
msgstr "Když zbývá <code>1.0</code> metr -> rychlost = <code>0.50</code>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:52
|
||||
#, no-wrap
|
||||
msgid "<code>0.5</code> meter left -> speed = <code>0.25</code>"
|
||||
msgstr "Když zbývá <code>0.5</code> metru -> rychlost = <code>0.25</code>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:53
|
||||
#, no-wrap
|
||||
msgid "<code>0.0</code> meter left -> speed = <code>0.00</code> (stop)"
|
||||
msgstr "Když zbývá <code>0.0</code> metrů -> rychlost = <code>0.00</code>"
|
||||
|
||||
#. type: Image filename
|
||||
#: ../help/help.E.txt:55
|
||||
#, no-wrap
|
||||
msgid "tdragst1"
|
||||
msgstr "tdragst1_cs"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:56
|
||||
#, no-wrap
|
||||
msgid "You can use the following <a cbot|expr>expression</a> <code>(25-len)/2</code> in order to calculate the value for the speed instruction that must be given to the motors."
|
||||
msgstr "Potřebný výkon motorů můžete vypočítat <a cbot|expr>výrazem</a> <code>(25-len)/2</code>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:58
|
||||
#, no-wrap
|
||||
msgid "It is now up to you to put everything together and to test the program."
|
||||
msgstr "Sestavit celý program a vyzkoušet ho už je na Vás."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:60
|
||||
#, no-wrap
|
||||
msgid "Remark"
|
||||
msgstr "Poznámky"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:61
|
||||
#, no-wrap
|
||||
msgid "You can use values greater than 1 for the instruction <c/><a cbot|motor>motor</a>();<n/>, but the bot will not move any faster."
|
||||
msgstr "Příkazu <c/><a cbot|motor>motor</a>();<n/> můžete zadat i hodnoty větší než 1, ale robot nepojede o nic rychleji."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:63
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:64
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:6
|
||||
#, no-wrap
|
||||
msgid "This instruction asks for two values:"
|
||||
msgstr "Tento příkaz vyžaduje dva parametry:"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:12
|
||||
#, no-wrap
|
||||
msgid "The values must range between -1 and 1:"
|
||||
msgstr "Hodnoty musejí být v rozsahu -1 až 1:"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:48
|
||||
#, no-wrap
|
||||
msgid "In order to slow down progressively, the speed of the motors must be proportional to the remaining distance:"
|
||||
msgstr "Abyste postupně zpomalovali, musíte výkon motorů snižovat přímo úměrně zbývající vzdálenosti:"
|
|
@ -0,0 +1,248 @@
|
|||
# This file is part of the Colobot: Gold Edition source code
|
||||
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
# This file is distributed under the same license as the Colobot package.
|
||||
# next_ghost <next_ghost@quick.cz>, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1.11\n"
|
||||
"POT-Creation-Date: DATE\n"
|
||||
"PO-Revision-Date: 2018-03-18 16:13+01\n"
|
||||
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
||||
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
||||
"Language: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
||||
"X-Language: cs_CZ\n"
|
||||
"X-Source-Language: en_US\n"
|
||||
|
||||
#. type: Title-text
|
||||
#: ../scene.txt:1
|
||||
#, no-wrap
|
||||
msgid "Radar"
|
||||
msgstr "Radar"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Use the radar to find lots of stupid blue crosses."
|
||||
msgstr "Hledejte pomocí radaru spoustu hloupých modrých křížků."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Find"
|
||||
msgstr "Hledac"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Exercise"
|
||||
msgstr "Cvičení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "Let the bot find all the <a object|waypoint>blue crosses</a> on the ground. As soon as the bot passed over one of the crosses, it will disappear. Here is the general principle that you will apply:"
|
||||
msgstr "Pošlete robota najít všechny <a object|waypoint>modré křížky</a> na zemi. Každý křížek zmizí, když přes něj robot přejede. Zde je obecný postup, jak úkol vyřešit:"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:5
|
||||
#, no-wrap
|
||||
msgid "Look for a cross"
|
||||
msgstr "Najít křížek."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:6
|
||||
#, no-wrap
|
||||
msgid "If there is none, stop the program."
|
||||
msgstr "Pokud žádný neexistuje, ukončit program."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "Calculate the direction of the cross."
|
||||
msgstr "Vypočítat směr ke křížku."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:8
|
||||
#, no-wrap
|
||||
msgid "Set the speed of the motors in such a way that they will find their way to the cross."
|
||||
msgstr "Nastavit výkon motorů, aby robot ke křížku postupně dojel."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:10
|
||||
#, no-wrap
|
||||
msgid "The program"
|
||||
msgstr "Program"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:11
|
||||
#, no-wrap
|
||||
msgid "Use a <code><a cbot|while>while</a></code> loop in order to repeat several instructions over and over:"
|
||||
msgstr "Opakujte několik příkazů stále dokola pomocí cyklu <code><a cbot|while>while</a></code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:12
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<code>while ( true )\n"
|
||||
"{\n"
|
||||
"\t</code>instructions...<c/>\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<code>while ( true )\n"
|
||||
"{\n"
|
||||
"\t</code>příkazy...<c/>\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:17
|
||||
#, no-wrap
|
||||
msgid "The instruction <code><a cbot|radar>radar</a></code> will detect the blue crosses and put their description into a variable, for example <code>spot</code>. In this case, <code><a cbot|radar>radar</a>()</code> needs only one parameter, i.e. the category of the object that it must look for:"
|
||||
msgstr "Najděte modré křížky pomocí příkazu <code><a cbot|radar>radar</a></code> a uložte si jejich popis do proměnné, nazvěme ji například <code>spot</code>. V tomto případě potřebuje příkaz <code><a cbot|radar>radar</a>()</code> pouze jeden parametr, tj. kategorii objektu, který má hledat:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:18
|
||||
#, no-wrap
|
||||
msgid "<c/>spot = radar(WayPoint);"
|
||||
msgstr "<c/>spot = radar(WayPoint);"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:20
|
||||
#, no-wrap
|
||||
msgid "Once all the crosses have been found, <code>radar</code> will return the value <code><a cbot|null>null</a></code>. You will have to test this case and react accordingly with the instruction <code><a cbot|if>if</a></code>:"
|
||||
msgstr "Po nalezení posledního křížku vrátí příkaz <code>radar</code> hodnotu <code><a cbot|null>null</a></code>. Tuto možnost musíte vhodně ošetřit příkazem <code><a cbot|if>if</a></code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:21
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>if ( spot == null ) // no more ?\n"
|
||||
"{\n"
|
||||
"\tmotor(0, 0); // stops the motors\n"
|
||||
"\tbreak; // stops the loop\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<c/>if ( spot == null ) // už žádné křížky?\n"
|
||||
"{\n"
|
||||
"\tmotor(0, 0); // zastavit motory\n"
|
||||
"\tbreak; // ukončit cyklus\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:26
|
||||
#, no-wrap
|
||||
msgid "<n/>The instruction <code><a cbot|break>break</a></code> will stop the infinite loop <code>while (true)</code>."
|
||||
msgstr "<n/>Příkaz <code><a cbot|break>break</a></code> ukončí nekonečný cyklus <code>while (true)</code>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:28
|
||||
#, no-wrap
|
||||
msgid "Use the instruction <code><a cbot|direct>direction</a>()</code> to calculate the angle of the rotation that the bot must perform in order to turn towards the blue cross. The coordinates of the object are given by <code>spot.position</code>. The following line will put the angle of the necessary rotation into the <a cbot|var>variable</a> <code>dir</code>:"
|
||||
msgstr "Úhel, o který se robot musí otočit směrem ke křížku, vypočítejte příkazem <code><a cbot|direct>direction</a>()</code>. Polohu objektu udává výraz <code>spot.position</code>. Následující řádek uloží potřebný úhel do <a cbot|var>proměnné</a> <code>dir</code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:29
|
||||
#, no-wrap
|
||||
msgid "<c/>dir = direction(spot.position);"
|
||||
msgstr "<c/>dir = direction(spot.position);"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:31
|
||||
#, no-wrap
|
||||
msgid "The value of the angle is positive if the blue cross is on your left hand, and negative if it is on your right hand. If the cross to be reached is on your left hand, you must set the right-hand motor to full speed, and set the left-hand motor to a lower speed, according to the angle:"
|
||||
msgstr "Pokud bude modrý křížek nalevo od robota, úhel bude kladný, naopak pro křížek napravo bude záporný. Pokud je křížek nalevo od robota, musíte pravý motor spustit na plný výkon a levý motor na nižší výkon podle úhlu:"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:33
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" direction = <code> 0</code> -> speed = <code> 1.0</code>\n"
|
||||
" direction = <code> 45</code> -> speed = <code> 0.5</code>\n"
|
||||
" direction = <code> 90</code> -> speed = <code> 0.0</code>\n"
|
||||
" direction = <code>135</code> -> speed = <code>-0.5</code>\n"
|
||||
" direction = <code>180</code> -> speed = <code>-1.0</code>"
|
||||
msgstr ""
|
||||
" úhel = <code> 0</code> -> výkon = <code> 1.0</code>\n"
|
||||
" úhel = <code> 45</code> -> výkon = <code> 0.5</code>\n"
|
||||
" úhel = <code> 90</code> -> výkon = <code> 0.0</code>\n"
|
||||
" úhel = <code>135</code> -> výkon = <code>-0.5</code>\n"
|
||||
" úhel = <code>180</code> -> výkon = <code>-1.0</code>"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:39
|
||||
#, no-wrap
|
||||
msgid "The graphic below shows the speed of the left-hand and right-hand motor as set by the instruction <code><a cbot|motor>motor</a></code>, according to the angle:"
|
||||
msgstr "Obrázek níže ilustruje, jaký výkon jednotlivých motorů má příkaz <code><a cbot|motor>motor</a></code> nastavit v závislosti na úhlu:"
|
||||
|
||||
#. type: Image filename
|
||||
#: ../help/help.E.txt:41
|
||||
#, no-wrap
|
||||
msgid "radar2"
|
||||
msgstr "radar2_cs"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:42
|
||||
#, no-wrap
|
||||
msgid "If the cross is straight ahead, the angle is 0 degrees. The motors will get the speeds 1 and 1, which means full speed ahead. If the cross is behind, the right motor will be set to speed -1: it will turn around. You can use the <a cbot|expr>expression</a> <code>1+dir/90</code> in order to calculate the necessary speed of the motors:"
|
||||
msgstr "Pokud je křížek rovně před robotem, úhel bude 0 stupňů. Motorům se zadá výkon 1 a 1, což znamená plnou rychlostí vpřed. Pokud je křížek za robotem, pravému motoru se zadá výkon -1: robot se otočí. Vhodný výkon motorů můžete vypočítat <a cbot|expr>výrazem</a> <code>1+dir/90</code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:43
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>if ( dir < 0 ) // on the right side?\n"
|
||||
"{\n"
|
||||
"\tmotor(1, 1+dir/90); // turns more or less\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<c/>if ( dir < 0 ) // je křížek napravo?\n"
|
||||
"{\n"
|
||||
"\tmotor(1, 1+dir/90); // zatočit podle úhlu\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:48
|
||||
#, no-wrap
|
||||
msgid "Use the same principle if the angle has got a positive value, ranging between 0 and 180 degrees. It is up to you to work out the exact instructions to be performed:"
|
||||
msgstr "Podobně postupujte, pokud je úhel kladný, v rozsahu od 0 do 180 stupňů. Vymyslet správné příkazy pro robota už je na Vás:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:49
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<code>else // on the left side?\n"
|
||||
"{\n"
|
||||
"\t</code>up to you to fill in here...<c/>\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<code>else // je křížek nalevo?\n"
|
||||
"{\n"
|
||||
"\t</code>sem doplňte příkazy...<c/>\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:54
|
||||
#, no-wrap
|
||||
msgid "At the beginning of the program, you must still declare all the variables. <code>spot</code> is of type <code><a cbot|object>object</a></code>, whereas <code>dir</code> is of type <code><a cbot|float>float</a></code>."
|
||||
msgstr "Na začátku programu samozřejmě musíte deklarovat všechny proměnné. Proměnná <code>spot</code> musí mít typ <code><a cbot|object>object</a></code>, <code>dir</code> musí mít typ <code><a cbot|float>float</a></code>."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:56
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:57
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:4
|
||||
#, no-wrap
|
||||
msgid "Repeat forever:"
|
||||
msgstr "Opakovat stále dokola:"
|
|
@ -0,0 +1,72 @@
|
|||
# This file is part of the Colobot: Gold Edition source code
|
||||
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
# This file is distributed under the same license as the Colobot package.
|
||||
# next_ghost <next_ghost@quick.cz>, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1.11\n"
|
||||
"POT-Creation-Date: DATE\n"
|
||||
"PO-Revision-Date: 2018-03-18 18:21+01\n"
|
||||
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
||||
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
||||
"Language: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
||||
"X-Language: cs_CZ\n"
|
||||
"X-Source-Language: en_US\n"
|
||||
|
||||
#. type: Title-text
|
||||
#: ../scene.txt:1
|
||||
#, no-wrap
|
||||
msgid "Crazy bot"
|
||||
msgstr "Pomatený robot"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Use the radar to put some order into a big mess left behind by a crazy bot."
|
||||
msgstr "Použijte radar, abyste uklidili nepořádek po bláznivém robotu."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Move"
|
||||
msgstr "Uklid"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Exercise"
|
||||
msgstr "Cvičení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "In this exercise, a \"crazy bot\" places many <a object|waypoint>blue crosses</a> on the ground. In order to find them, you can reuse the program written in the previous exercise. This can show you the flexibility of such a program: it adapts to whatever environment it encounters."
|
||||
msgstr "V tomto cvičení za sebou \"pomatený robot\" nechává na zemi spoustu <a object|waypoint>modrých křížků</a>. Využijte program z předchozího cvičení, abyste je uklidili. Ověříte si tím flexibilitu takového programu: dokáže se přizpůsobit libovolnému prostředí."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:4
|
||||
#, no-wrap
|
||||
msgid "Remark"
|
||||
msgstr "Poznámky"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:5
|
||||
#, no-wrap
|
||||
msgid "Do not wait too long, because the crazy bot gets down to work immediately. Fortunately, as long as you are in the program editor, the game will pause."
|
||||
msgstr "Zbytečně neotálejte, protože pomatený robot už začal řádit. Naštěstí se hra během psaní programu pozastaví."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:8
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|
|
@ -0,0 +1,120 @@
|
|||
# This file is part of the Colobot: Gold Edition source code
|
||||
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
# This file is distributed under the same license as the Colobot package.
|
||||
# next_ghost <next_ghost@quick.cz>, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1.11\n"
|
||||
"POT-Creation-Date: DATE\n"
|
||||
"PO-Revision-Date: 2018-03-19 21:34+01\n"
|
||||
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
||||
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
||||
"Language: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
||||
"X-Language: cs_CZ\n"
|
||||
"X-Source-Language: en_US\n"
|
||||
|
||||
#. type: Title-text
|
||||
#: ../scene.txt:1
|
||||
#, no-wrap
|
||||
msgid "Patient hunter"
|
||||
msgstr "Trpělivý lovec"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Be patient enough not to waste your ammunitions."
|
||||
msgstr "Buďte dost trpěliví, abyste neplýtvali střelivem."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Patient"
|
||||
msgstr "Trpelivost"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Exercise"
|
||||
msgstr "Cvičení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "You must find a way to destroy the four moving <a object|bottarg>target bots</a> without wasting one shot. Notice that after every move, the targets will stay motionless during one second."
|
||||
msgstr "Vymyslete způsob, jak zničit čtyři pohyblivé <a object|bottarg>cvičné cíle</a> a ani jednou při tom neminout. Všimněte si, že cvičné cíle zůstanou po každém přesunu na jednu sekundu nehybně stát."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:4
|
||||
#, no-wrap
|
||||
msgid "General principle"
|
||||
msgstr "Obecný postup"
|
||||
|
||||
#. type: Bullet: '1)'
|
||||
#: ../help/help.E.txt:5
|
||||
#, no-wrap
|
||||
msgid "Detect a target with the instruction <c/><a cbot|radar>radar</a>(TargetBot);<n/>."
|
||||
msgstr "Najděte cíl příkazem <c/><a cbot|radar>radar</a>(TargetBot);<n/>."
|
||||
|
||||
#. type: Bullet: '2)'
|
||||
#: ../help/help.E.txt:6
|
||||
#, no-wrap
|
||||
msgid "Turn towards the target with <c/><a cbot|turn>turn</a>(direction());<n/>."
|
||||
msgstr "Otočte k cíli příkazem <c/><a cbot|turn>turn</a>(direction());<n/>."
|
||||
|
||||
#. type: Bullet: '3)'
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "After the rotation, check if the target did not move."
|
||||
msgstr "Po otočení zkontrolujte, jestli se cíl nepohnul."
|
||||
|
||||
#. type: Bullet: '4)'
|
||||
#: ../help/help.E.txt:8
|
||||
#, no-wrap
|
||||
msgid "If it did not, wait 0.2 seconds with <c/><a cbot|wait>wait</a>(0.2);<n/>."
|
||||
msgstr "Pokud se nepohnul, počkejte 0,2 sekundy příkazem <c/><a cbot|wait>wait</a>(0.2);<n/>."
|
||||
|
||||
#. type: Bullet: '5)'
|
||||
#: ../help/help.E.txt:9
|
||||
#, no-wrap
|
||||
msgid "Re-check if the target did not move."
|
||||
msgstr "Znovu zkontrolujte, jestli se cíl nepohnul."
|
||||
|
||||
#. type: Bullet: '6)'
|
||||
#: ../help/help.E.txt:10
|
||||
#, no-wrap
|
||||
msgid "If it did not, shoot with <c/><a cbot|fire>fire</a>(2);<n/> and wait 2 seconds for the target to be hit by the bullets and destroyed."
|
||||
msgstr "Pokud se nepohnul, vystřelte příkazem <c/><a cbot|fire>fire</a>(2);<n/> a počkejte 2 sekundy, než střely cíl zasáhnou a zničí."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:12
|
||||
#, no-wrap
|
||||
msgid "There are of course other ways to achieve the goal."
|
||||
msgstr "Samozřejmě jsou i jiné možnosti, jak úkol splnit."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:14
|
||||
#, no-wrap
|
||||
msgid "Remark"
|
||||
msgstr "Poznámky"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:15
|
||||
#, no-wrap
|
||||
msgid "In order to increase the efficiency of your shots, aim a little downward with <c/><a cbot|aim>aim</a>(-3);<n/>."
|
||||
msgstr "Abyste zlepšili přesnost palby, namiřte trochu dolů příkazem <c/><a cbot|aim>aim</a>(-3);<n/>."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:17
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:18
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|
|
@ -0,0 +1,248 @@
|
|||
# This file is part of the Colobot: Gold Edition source code
|
||||
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
# This file is distributed under the same license as the Colobot package.
|
||||
# next_ghost <next_ghost@quick.cz>, 2018.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1.11\n"
|
||||
"POT-Creation-Date: DATE\n"
|
||||
"PO-Revision-Date: 2018-03-21 23:38+01\n"
|
||||
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
||||
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
||||
"Language: Czech\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
||||
"X-Language: cs_CZ\n"
|
||||
"X-Source-Language: en_US\n"
|
||||
|
||||
#. type: Title-text
|
||||
#: ../scene.txt:1
|
||||
#, no-wrap
|
||||
msgid "Shadow"
|
||||
msgstr "Ocásek"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Follow a bot, as if you were its shadow."
|
||||
msgstr "Jezděte za jiným robotem jako jeho ocásek."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Follow"
|
||||
msgstr "Ocasek"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Exercise"
|
||||
msgstr "Cvičení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "You must follow the <a object|bottr>target bot</a> with the explosive device, but without touching it, otherwise it will blow up. Every time the target bot stops, you must be close to it (less than 10m). After you managed to stay close to the target bot at 10 successive stops, it will lead you to the finishing pad, and the exercise is over. At every stop, the target bot checks that you are there. If you are not there, you must start over again."
|
||||
msgstr "Držte se blízko <a object|bottr>cvičného cíle</a> naloženého výbušninami, ale nesmíte se ho dotknout, jinak vybuchne. Pokaždé, když se cvičný cíl zastaví, musíte k němu být blíže než 10 metrů. Když s ním udržíte krok 10 zastávek po sobě, zavede Vás na cílovou značku a cvičení skončí. Cvičný cíl při každé zastávce kontroluje, kde jste. Pokud budete moc daleko, budete muset začít znovu od začátku."
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:4
|
||||
#, no-wrap
|
||||
msgid "General principle"
|
||||
msgstr "Obecný postup"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:6
|
||||
#, no-wrap
|
||||
msgid "Look for the target bot."
|
||||
msgstr "Najít cvičný cíl."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "Calculate the distance to the bot."
|
||||
msgstr "Vypočítat vzdálenost k cíli."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:8
|
||||
#, no-wrap
|
||||
msgid "if the distance to the target bot is less than 5m, move backward."
|
||||
msgstr "Pokud je vzdálenost menší než 5m, zacouvat."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:9
|
||||
#, no-wrap
|
||||
msgid "Otherwise, calculate the direction of the target bot, and move towards it."
|
||||
msgstr "Jinak spočítat směrový úhel a popojet k cvičnému cíli."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:11
|
||||
#, no-wrap
|
||||
msgid "As many times before, use <code><a cbot|while>while</a> (true)</code> in order to perform the infinite loop:"
|
||||
msgstr "Stejně jako mnohokrát předtím, použijte cyklus <code><a cbot|while>while</a> (true)</code> k vytvoření nekonečné smyčky:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:12
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<code>while (true)\n"
|
||||
"{\n"
|
||||
"\t</code>instructions to be repeated ...<c/>\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<code>while (true)\n"
|
||||
"{\n"
|
||||
"\t</code>příkazy, které se mají opakovat...<c/>\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:17
|
||||
#, no-wrap
|
||||
msgid "Look for the target bot with the instruction <code><a cbot|radar>radar</a></code>:"
|
||||
msgstr "Cvičný cíl najděte příkazem <code><a cbot|radar>radar</a></code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:18
|
||||
#, no-wrap
|
||||
msgid "<c/>\ttarget = radar(TargetBot);"
|
||||
msgstr "<c/>\ttarget = radar(TargetBot);"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:20
|
||||
#, no-wrap
|
||||
msgid "You do not have to test if the radar found a target bot: there must be one."
|
||||
msgstr "Nemusíte kontrolovat, jestli radar něco našel, protože jeden cvičný cíl v tomto cvičení být musí."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:22
|
||||
#, no-wrap
|
||||
msgid "Use the instruction <code><a cbot|dist>distance</a>( , )</code> to calculate the distance between two points. The first point will be the position of your own bot, given by <code>position</code>. The second point is the position of the target bot, given by <code>target.position</code>."
|
||||
msgstr "Pro výpočet vzdálenosti mezi dvěma body použijte příkaz <code><a cbot|dist>distance</a>( , )</code>. První bod bude poloha vašeho robota daná výrazem <code>position</code>. Druhý bod bude poloha cvičného cíle daná výrazem <code>target.position</code>."
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:23
|
||||
#, no-wrap
|
||||
msgid "<c/>len = distance(position, target.position);"
|
||||
msgstr "<c/>len = distance(position, target.position);"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:25
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"If the distance to the target bot is smaller than 5m, move backward with a speed inversely proportional to the distance: the closer you are to the bot, the faster you must move backward.\n"
|
||||
"\tDistance = 5.0 meters -> speed = 0.0\n"
|
||||
"\tDistance = 2.5 meters -> speed = -0.5\n"
|
||||
"\tDistance = 0.0 meters -> speed = -1.0\n"
|
||||
"You can use the <a cbot|expr>expression</a> <code>distance/5-1</code> in order to achieve this, together with the <code><a cbot|if>if</a></code> to test if the target is closer than 5m:"
|
||||
msgstr ""
|
||||
"Pokud jste od cvičného cíle méně než 5m daleko, couvejte rychlostí nepřímo úměrnou vzdálenosti: čím blíže k němu jste, tím rychleji musíte couvat.\n"
|
||||
"\tVzdálenost = 5.0 metrů -> výkon = 0.0\n"
|
||||
"\tVzdálenost = 2.5 metru -> výkon = -0.5\n"
|
||||
"\tVzdálenost = 0.0 metrů -> výkon = -1.0\n"
|
||||
"Vhodný výkon motorů můžete vypočítat <a cbot|expr>výrazem</a> <code>distance/5-1</code> a vzdálenost od cvičného cíle kontrolujte příkazem <code><a cbot|if>if</a></code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:30
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>if ( len < 5 ) // too close ?\n"
|
||||
"{\n"
|
||||
"\tmotor(len/5-1, len/5-1); // moves backward\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<c/>if ( len < 5 ) // moc blízko?\n"
|
||||
"{\n"
|
||||
"\tmotor(len/5-1, len/5-1); // zacouvat\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:35
|
||||
#, no-wrap
|
||||
msgid "If the distance to the target is greater than 5m, move towards the target. First calculate the angle necessary to face the target with the instruction <code><a cbot|direct>direction</a></code>. You can then adjust the speed of the right-hand and left-hand motor in order to follow the target:"
|
||||
msgstr "Pokud je vzdálenost od cvičného cíle větší než 5m, jeďte k němu. Nejprve příkazem <code><a cbot|direct>direction</a></code> spočítejte směrový úhel, o který se k němu musíte otočit. Pak můžete nastavit výkon motorů a vyjet k cíli:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:36
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"<c/>else\n"
|
||||
"{\n"
|
||||
"\tdir = direction(target.position);\n"
|
||||
"\tif ( dir >= 0 ) // target on the left side?\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(1-dir/90, 1);\n"
|
||||
"\t}\n"
|
||||
"\telse // target on the right side?\n"
|
||||
"\t{\n"
|
||||
"\t\t<n/>it is up to you to fill in<c/>\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"<c/>else\n"
|
||||
"{\n"
|
||||
"\tdir = direction(target.position);\n"
|
||||
"\tif ( dir >= 0 ) // cíl je nalevo?\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(1-dir/90, 1);\n"
|
||||
"\t}\n"
|
||||
"\telse // cíl je napravo?\n"
|
||||
"\t{\n"
|
||||
"\t\t<n/>zbytek dopište sami<c/>\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:49
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"When the target is on your left, <code>dir</code> takes a positive value, ranging between 0 and 180. The <a cbot|expr>expression</a> <code>1-dir/90</code> returns a speed ranging between 1 and -1, according to the direction:\n"
|
||||
"\tdirection = 0 -> speed = 1.0\n"
|
||||
"\tdirection = 45 -> speed = 0.5\n"
|
||||
"\tdirection = 90 -> speed = 0.0\n"
|
||||
"\tdirection = 135 -> speed = -0.5\n"
|
||||
"\tdirection = 180 -> speed = -1.0"
|
||||
msgstr ""
|
||||
"Když bude cíl nalevo od robota, proměnná <code>dir</code> bude obsahovat kladnou hodnotu od 0 do 180. <a cbot|expr>Výraz</a> <code>1-dir/90</code> vrátí hodnotu výkonu od -1 do 1 v závislosti na směrovém úhlu:\n"
|
||||
"\túhel = 0 -> výkon = 1.0\n"
|
||||
"\túhel = 45 -> výkon = 0.5\n"
|
||||
"\túhel = 90 -> výkon = 0.0\n"
|
||||
"\túhel = 135 -> výkon = -0.5\n"
|
||||
"\túhel = 180 -> výkon = -1.0"
|
||||
|
||||
#. type: Image filename
|
||||
#: ../help/help.E.txt:56
|
||||
#, no-wrap
|
||||
msgid "radar2"
|
||||
msgstr "radar2_cs"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:57
|
||||
#, no-wrap
|
||||
msgid "When the target is on the right side, <code>dir</code> is negative, ranging between 0 and -180."
|
||||
msgstr "Když bude cíl napravo od robota, <code>dir</code> bude obsahovat zápornou hodnotu od 0 do -180."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:59
|
||||
#, no-wrap
|
||||
msgid "The only task left for you now is to declare the <a cbot|var>variables</a> that you use in the program. <code>target</code> is of type <code>object</code>, whereas <code>dir</code> and <code>len</code> are of type <code>float</code>."
|
||||
msgstr "Dále už musíte jen deklarovat <a cbot|var>proměnné</a>, které budete v programu používat. Proměnná <code>target</code> je typu <code>object</code>, zatímco proměnné <code>dir</code> a <code>len</code> jsou typu <code>float</code>."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:61
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:62
|
||||
#, no-wrap
|
||||
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
||||
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:5
|
||||
#, no-wrap
|
||||
msgid "Repeat forever :"
|
||||
msgstr "Opakovat stále dokola:"
|
Loading…
Reference in New Issue