with Auto ;
with Gada.Text_IO ;
procedure Mission10 is
package Txt renames Gada.Text_IO ;
procedure Afficher_Action (Vit : Float ; Act : Auto.T_Action) is
begin
Txt.Put_Line("Vitesse = " & Integer'Image(Integer(Vit)) & " km/h") ;
Txt.Put_Line("Direction = " & Integer'Image(Integer(Act.Direction)) & " degrés") ;
Txt.Put_Line("Accélération = " & Integer'Image(Act.Accelere)) ;
Txt.Put_Line("Freinage = " & Integer'Image(Act.Freinage)) ;
if Act.Urgence then
Txt.Put_Line(" --- ACTION D'URGENCE ---") ;
end if ;
Txt.New_Line ;
end Afficher_Action ;
procedure Tester_Affichage is
begin
Auto.Fixer_Destination (Long => -1.12, Lat => 40.31) ;
for Num in 1..10 loop
Afficher_Action(Vit => Auto.Vitesse, Act => Auto.Action_Courante) ;
Auto.Attend_Ms ;
end loop ;
end Tester_Affichage ;
begin
Tester_Affichage ;
end Mission10 ;