Modifications

Sauter à la navigation Sauter à la recherche
Ligne 85 : Ligne 85 :     
== Movement classes ==
 
== Movement classes ==
ENG: A list of ''movement'' can be provided to the RobotBase descendant class (formally, the Doggy instance) at creation time. This allows to easily extend the collection of movement of a robot.  
+
ENG: A list of ''movement'' can be provided to the RobotBase descendant class (formally, the Doggy instance) at creation time. This allows to easily extend the collection of movement of a robot. If you take a look at the end of the {{fname|doggy.py}} then you will find the following statements.
   −
FR: Une liste de ''mouvement'' peut être communiqué à la classe descendante de RoboBase (formellement, l'instance de Doggy) au moment de sa création. Cela permet de facilement étendre la collection de mouvement d'un Robot.
+
FR: Une liste de ''mouvement'' peut être communiqué à la classe descendante de RoboBase (formellement, l'instance de Doggy) au moment de sa création. Cela permet de facilement étendre la collection de mouvement d'un Robot. Si vous consultez la fin du fichier {{fname|doggy.py}}, vous trouverez la déclaration suivante:
   
+
 
 +
  <nowiki># Defining the list of movements
 +
MovementsCls.append( Forward )
 +
MovementsCls.append( Backward )
 +
MovementsCls.append( Left )
 +
MovementsCls.append( Right )
 +
MovementsCls.append( Hello )</nowiki>
 
=== class Forward( Movement ) ===
 
=== class Forward( Movement ) ===
 
ENG: Make a forward movement for the Robot. Movement names: 'FORWARD','F'
 
ENG: Make a forward movement for the Robot. Movement names: 'FORWARD','F'
Ligne 105 : Ligne 111 :     
=== class Right( Movement ) ===
 
=== class Right( Movement ) ===
ENG: Make a Right rotation movement for the Robot. Movement names: 'RIGHT','R'
+
ENG: Make a Right rotation movement for the Robot. Find here under a picture explaining how the "movement" is taken in charge by the class.<br />Movement names: 'RIGHT','R'
 +
 
 +
FR: Fait un mouvement de rotation sur la droite. Vous trouverez ci-dessous un graphique expliquant comment le mouvement est pris en charge par la classe<br />Noms du mouvement: 'RIGHT','R'
   −
FR: Fait un mouvement de rotation sur la droite. Noms du mouvement: 'RIGHT','R'
+
[[Fichier:DOGGY-rotate-how-to.jpg]]
    
=== class Hello( Movement ) ===
 
=== class Hello( Movement ) ===
29 918

modifications

Menu de navigation