# 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" "Report-Msgid-Bugs-To: \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: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Translate Toolkit 1.11.0\n" #. type: One-char language identifier #: train202.languagecode:1 #, no-wrap msgid "E" msgstr "F" # #. type: Title-text #: train202/scene.txt:1 #, no-wrap msgid "train202:Flying tower 1" msgstr "train202:Tour volante 1" # #. type: Resume-text #: train202/scene.txt:2 #, no-wrap msgid "train202:Make a flying defense tower out of a winged shooter." msgstr "" "train202:Programmer un robot volant de manière à obtenir une tour de défense " "volante" # #. type: ScriptName-text #: train202/scene.txt:3 #, no-wrap msgid "train202:Move" msgstr "train202:Tour1" #. type: \b; header #: train202-help/tant2.txt:1 #, no-wrap #, fuzzy, no-wrap msgid "Objective" msgstr "Objectif" #. type: Plain text #: train202-help/tant2.txt:3 #, no-wrap #, 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 "" "Le robot shooter volant est au fond d'un trou. Des fourmis agressives arrivent plus haut, de tous les côtés. Il " "faudra donc décoller jusqu'au niveau des fourmis, puis tirer tout en " "maintenant une altitude constante." #. type: \t; header #: train202-help/tant2.txt:4 #, no-wrap #, fuzzy, no-wrap msgid "Program" msgstr "Programme" #. type: Plain text #: train202-help/tant2.txt:6 #, no-wrap #, 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 "" "Pour tuer les fourmis, on les cherche avec le radar(), on tourne ensuite dans leur direction puis on " "tire une seconde. Le tout répété à l'infini avec une boucle while(true) comme d'habitude:" #. type: \s; block (usually verbatim code) #: train202-help/tant2.txt:18 #, no-wrap #, 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 #, no-wrap #, 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 "" "N'oubliez pas de déclarer la variable chose, qui est de type " "object" #. type: Plain text #: train202-help/tant2.txt:22 #, no-wrap #, 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 "" "La commande jet() active le réacteur qui se " "trouve sous les robots volants. La valeur qu'on donne entre parenthèses doit " "être comprise entre -1 et 1. jet(1); fait " "monter le robot le plus vite possible. jet(-1); le fait descendre à " "la vitesse maximale, et jet(0); lui fait garder son altitude. Comme " "le robot doit atteindre une altitude précise, on le fait monter doucement " "avec jet(0.2);, on attend jusqu'à ce qu'il ait atteint l'altitude " "voulue, puis on le stabilise avec jet(0);." #. type: Plain text #: train202-help/tant2.txt:24 #, no-wrap #, 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 "" "Pour \"attendre que le robot ait atteint l'altitude voulue\", il faut faire " "une boucle conditionnelle: ce qui se trouve à l'intérieur de la boucle se " "répète tant qu'une certaine condition est remplie. L'altitude du robot est " "donné par position.z. Nous avons vu que position " "donne la position du robot. Or une position est donnée par les trois " "coordonnées x, y et z de l'espace cartésien: l'axe des x est l'axe est-" "ouest, l'axe des y est l'axe nord-sud, et l'axe des z est l'axe vertical. Il " "suffit donc d'attendre tant que position.z est plus petit que " "20 mètres, ce qui s'écrit:" #. type: \s; block (usually verbatim code) #: train202-help/tant2.txt:29 #, no-wrap #, 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 #, no-wrap #, 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 "" "Toutes les 0.2 secondes, il va voir si l'altitude est encore inférieure à 20 " "mètres. Si oui, on attend encore. Si non, on continue. N'oubliez pas après " "cette boucle de stabiliser l'altitude avec jet(0);." #. type: \t; header #: train202-help/tant2.txt:32 #, no-wrap #, fuzzy, no-wrap msgid "See also" msgstr "Voir aussi" #. type: Plain text #: train202-help/tant2.txt:33 #, no-wrap #, fuzzy, no-wrap msgid "" "Programming, types and categories." msgstr "Exercice précédent et programmation." # #~ msgid "train200:Ants and wasps" #~ msgstr "train200:Fourmis et guêpes" # #~ msgid "train200:Fight against moving targets" #~ msgstr "train200:Combat contre des cibles mouvantes" # #~ msgid "train200:" #~ msgstr "train200:" # #~ msgid "train201:Barrage Fire" #~ msgstr "train201:Tir de barrage" # #~ msgid "train201:" #~ msgstr "train201:" # #~ msgid "" #~ "train201:Set the power of the different motors in order to achieve a " #~ "barrage fire." #~ msgstr "" #~ "train201:Effectuer à l'aide de la commande directe des moteurs un tir de " #~ "barrage contre des fourmis qui attaquent" # #~ msgid "train201:Move" #~ msgstr "train201:Barrage" # #~ msgid "train202:" #~ msgstr "train202:" # #~ msgid "train203:Flying Tower 2" #~ msgstr "train203:Tour volante 2" # #~ msgid "train203:" #~ msgstr "train203:" # #~ msgid "train203:Program a flying tower that wastes less energy." #~ msgstr "train203:Une tour de défense volante plus économe en énergie" # #~ msgid "train203:Move" #~ msgstr "train203:Tour2" # #~ msgid "train204:Fighter Jet 1" #~ msgstr "train204:Chasseur à réaction 1" # #~ msgid "train204:" #~ msgstr "train204:" # #~ msgid "train204:Instruct a winged shooter to clean the whole region." #~ msgstr "" #~ "train204:Programmez un shooter volant pour qu'il nettoie toute la région" # #~ msgid "train204:Move" #~ msgstr "train204:Chasseur1" # #~ msgid "train205:Fighter Jet 2" #~ msgstr "train205:Chasseur à réaction 2" # #~ msgid "train205:" #~ msgstr "train205:" # #~ msgid "train205:Adapt the program to a mountainous terrain." #~ msgstr "train205:Adaptez le programme à un relief accidenté" # #~ msgid "train205:Move" #~ msgstr "train205:Chasseur2" # #~ msgid "train206:Wasp Hunter 1" #~ msgstr "train206:Chasseur de guêpes 1" # #~ msgid "train206:" #~ msgstr "train206:" # #~ msgid "train206:Shoot down the flying wasps." #~ msgstr "train206:Attrapez des guêpes en vol" # #~ msgid "train206:Wasp1" #~ msgstr "train206:Guêpes1" # #~ msgid "train207:Wasp Hunter 2" #~ msgstr "train207:Chasseur de guêpes 2" # #~ msgid "train207:" #~ msgstr "train207:" # #~ msgid "train207:Get better at shooting down the wasps." #~ msgstr "train207:Attrapez des guêpes de manière plus efficace" # #~ msgid "train207:Wasp2" #~ msgstr "train207:Guêpes2"