Program aliments;
 uses crt,graph;
 var Pilote,mode,rayon,x,rayon2,s,score,z:integer;
 var L,M,F:char;
 var name,nom:string;


  Procedure introcercles; {Animation d'introduction}
     begin
     clrscr;
     Cleardevice;

     For x:=1 to 200 do                      {Animation des 5 cercles}
      begin;
      setfillstyle(9,red);
      setcolor(red); circle(300,240,rayon);
      setcolor(blue); circle(140,120,rayon);
      setcolor(green); circle(500,120,rayon);
      setcolor(cyan); circle(140,360,rayon);
      setcolor(magenta); circle(500,360,rayon);
      rayon:=rayon+3; delay(5); sound(50+s); s:=s+1;
      end;
     delay(5); cleardevice;
     For x:=1 to 55 do               {Animation du dernier cercle}
       begin setbkcolor(green);
       setfillstyle(7,lightgray); Fillellipse(300,240,rayon2,rayon2);
       rayon2:=rayon2+8; delay(5);sound(s); s:=s-1;
       end;
     nosound;
     Setfillstyle(1,lightgray);            {Ecran d'accueil}
     bar(30,30,610,450); Setcolor(green);Settextstyle(1,0,2);
     OuttextXY(60,60,'Ce jeu s''intitule ''Language et Degustations''');
     Line(60,90,500,90);
     Setcolor(red);Settextstyle(1,0,3); OuttextXY(90,150,'Programmeurs:');
     OutTextXY(200,240,'* CHARLES COTE *'); OutTextXY(200,270, '* MARC-OLIVIER DENIS*');
     Settextstyle(3,0,2); Setcolor(green); OutTextXY(60,410,'Appuyez sur ENTER pour continuer...');
     readln;
     end;


	procedure wrong; (* Procedure en cas de mauvaise reponse *)
	begin
	cleardevice;
	setfillstyle(1,red);
	fillellipse(320,240,200,200);
	setlinestyle(1,1,white);
	arc(320,300,0,180,100);
	setfillstyle(2,white);
	fillellipse(230,125,50,50);
	setfillstyle(3,white);
	fillellipse(410,125,50,50);
        sound(100);
	delay(2000);
        nosound;
	end;

	procedure good;  (* Procedure en cas de bonne reponse *)
	begin
	cleardevice;
	setfillstyle(1,green);
	fillellipse(320,240,200,200);
	setlinestyle(1,1,white);
	arc(320,300,180,0,100);
	setfillstyle(2,white);
	fillellipse(230,125,50,50);
	setfillstyle(3,white);
	fillellipse(410,125,50,50);
        sound(500);
	delay(2000);
        nosound;
	end;


  Procedure InstructionsFrancais;   {Procedure pour les instructions en francais}
     Begin
     Cleardevice;
     Setbkcolor(lightgreen); Setcolor(blue); Setlinestyle(0,$c3,3); rectangle(30,30,610,450);
     setlinestyle(0,$c3,1);      {Ecran qui demande le nom de l'usager}
     rectangle(27,27,613,453); rectangle(23,23,617,457); rectangle(18,18,622,462);
     rectangle(13,13,628,468); rectangle(6,6,635,475); rectangle(0,0,640,480);
     Settextstyle(3,0,2);
     OutTextXY(80,60,'Salut, jeune francophone!'); delay(500); settextstyle(3,0,1);
     setcolor(red); OutTextXY(75,140,'Quel est ton nom?'); line(75,200,300,200);
     gotoXY(11,12 ); readln(name); {Lis le nom de l'usager}
        setfillstyle(1,yellow);fillellipse(320,340,90,90); {Dessin du visage}
        arc(320,340,180,360,75); line(245,340,395,340);
        arc(285,320,360,180,35); line(250,320,320,320);
        arc(355,320,360,180,35); line(320,320,390,320);
        setfillstyle(1,red); fillellipse(365,300,7,7); fillellipse(295,300,7,7);
        OutTextXY(68,400,'Appuyez sur ENTER...');
     readln; cleardevice;
     setfillstyle(1,lightgreen); bar(32,32,608,448); {Rectangle pour effacer le texte}
     Settextstyle(2,0,7); OutTextXY(80,50,'INSTRUCTIONS'); line(80,70,217,70);  {Ecran d'instructions FR}
     Settextstyle(2,0,5);delay(500); OutTextXY(90,80,'*Ce jeu testera votre memoire en profondeur*');
     delay(2000); OutTextXY(75,105,'Vous aurez d''abord 20 secondes pour lire un court texte descriptif.');
     delay(2000); setcolor(red); OutTextXY(70,140,'Puis, vous devrez repondre a quelques questions concernant ce texte.');
     Settextstyle(2,0,6); delay(1500); setcolor(blue); OutTextXY(75,195,'*Chaque bonne reponse vous fait GAGNER 20 points*');
     OutTextXY(75,220,'*Chaque mauvaise reponse vous fait PERDRE 10 points*');
     delay(2000); SetTextStyle(2,0,9); OutTextXY(150,330,'Bonne chance'); OutTextXY(390,330,name);
     Settextstyle(2,0,5); OutTextXY(75,400,'Appuyez sur ENTER pour commencer...'); readln;

     end;

  Procedure InstructionsAnglais;   {Procedure pour les instructions en anglais}
     Begin
    cleardevice;
     Setbkcolor(yellow); Setcolor(blue); Setlinestyle(0,$c3,3); rectangle(30,30,610,450);
     setlinestyle(0,$c3,1);      {Ecran qui demande le nom de l'usager}
     rectangle(27,27,613,453); rectangle(23,23,617,457); rectangle(18,18,622,462);
     rectangle(13,13,628,468); rectangle(6,6,635,475); rectangle(0,0,640,480);
     Settextstyle(3,0,2);
     OutTextXY(80,60,'Good day, fellowman!'); delay(500); settextstyle(3,0,1);
     setcolor(red); OutTextXY(75,140,'What is your name?'); line(75,200,300,200);
          gotoXY(11,12 );readln(name);   {Lis le nom de l'usager}
        setfillstyle(1,yellow);fillellipse(320,340,90,90); {Dessin du visage}
        arc(320,340,180,360,75); line(245,340,395,340);
        arc(285,320,360,180,35); line(250,320,320,320);
        arc(355,320,360,180,35); line(320,320,390,320);
         OutTextXY(68,400,'Press ENTER...');
        setfillstyle(1,red); fillellipse(365,300,7,7); fillellipse(295,300,7,7);
        readln;
     cleardevice;
     setfillstyle(1,yellow); bar(32,32,608,448); {Rectangle pour effacer le texte}
     Settextstyle(2,0,7); OutTextXY(80,50,'INSTRUCTIONS'); line(80,70,217,70);  {Ecran d'instructions}
     Settextstyle(2,0,5);delay(500); OutTextXY(75,80,'*This game will test your memory and your English knowledge*');
     delay(2000); OutTextXY(75,105,'You will have 20 seconds to read a descriptive text.');
     delay(2000); setcolor(red); OutTextXY(70,140,'Then, you''ll have to answer a few questions about this text');
     Settextstyle(2,0,6); delay(1500); setcolor(blue); OutTextXY(75,195,'*A good answer is worth 20 points*');
     OutTextXY(75,220,'*A wrong answer will make you lose 10 points*');
     delay(2000); SetTextStyle(2,0,9); OutTextXY(200,330,'Good luck'); OutTextXY(390,330,name);
     Settextstyle(2,0,5); OutTextXY(75,400,'Press ENTER to begin...'); readln;
     end;

   Procedure layoutChoixLangue; {Procedure pour le menu de choix de langue}
     	Begin
     	Cleardevice;
     	Setbkcolor(yellow);
     	Setfillstyle(1,lightgreen);bar(30,30,610,450);
     	Setcolor(blue);Setlinestyle(0,$c3,1);Rectangle(30,30,610,450);
    	 delay(500);setcolor(blue);
    	 SetTextStyle(3,0,3);OutTextXY(80,60,'Bonjour! \ Welcome!');
     	delay(500); SetTextStyle(7,0,3);OutTextXY(90,110,'Choisis une langue \ Choose a language:');
    	 OutTextXY(150,220,'a) Francais');OutTextXY(150,270,'b) English');  {Choix de l'utilisateur}
     	Setfillstyle(1,blue); Fillellipse(450,300,100,100);  {Dessin du visage au bas de l'ecran}
     	Setfillstyle(1,green); Fillellipse(485,250,30,30); Fillellipse(410,250,20,20);
     	delay(50);
     	Setfillstyle(1,magenta); Fillellipse(485,250,10,10); Fillellipse(410,250,8,8); Fillellipse(447,330,45,45);
     	Circle(447,330,45);
     	z:=0;
    	 For x:=1 to 35 do
       begin
       sound(250+z); delay(50); nosound; z:=z+5;
       end;
     	L:=upcase(readkey);

    	end;

  Procedure Question1Francais;  {Procedure de la 1ere question en francais}
  Begin
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 1');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);
       OutTextXY(10,180,'La poutine est un met typiquement quebecois compose de frites,'); {Texte sur la poutine}
       OuttextXY(10,192,' de fromage cheddar en grains et de sauce barbecue chaude.');
       OutTextXY(10,204,'Elle trouve son origine dans le Quebec rural des annes 1950.');
       Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,222,'C''est le proprietaire d''un petit restaurant, dans la ville Acadienne de Warwick,');
       OutTextXY(10,234,'qui a eu l''idee d''ajouter du fromage a sa portion de Frite Sauce quotidienne.');
       OutTextXY(10,246,'Le mot ''poutine'' provient sans doute du mot anglais ''Pudding''.');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,264,'Il y a plusieurs variations a la poutine, la plus connue etant la poutine Italienne,');
       OutTextXY(10,276,'dans laquelle la sauce brune est remplacee par de la sauce spaghetti.');
       OutTextXY(10,288,'Une autre alternative est d''ajouter de la saucisse piquante a la poutine.');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Setfillstyle(1,lightgreen);
       settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDES ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECONDE ...');
       delay(1000);
        {Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TEMPS ECOULE!');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- Quelle sorte de fromage est utilisee dans une poutine?'); {Question 1 poutine}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Suisse');
       OutTextXY(30,220,'b) Cheddar'); OutTextXY(30,245,'c) Mozzarella');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- D''ou provient le mot poutine?');	 {Question 2 poutine}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Du mot pudding');
       OutTextXY(30,220,'b) Du premier ministre russe Vladimir Putin');
        OutTextXY(30,245,'c) Du nom d''un petit village acadien');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3- Vrai ou faux : Une poutine italienne est faite avec de la saucisse piquante.'); {Question 3 poutine}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Vrai');
       OutTextXY(30,220,'b) Faux'); 
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	
     End;

 Procedure Question2Francais;  {Procedure de la 2eme question en francais}
  Begin
	cleardevice;
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 2');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);   {Texte sur la pizza}
       OutTextXY(10,180,'La pizza est un met de cuisine italienne qui s''est repandue a travers le monde.');
       OuttextXY(10,192,'Le mot pizza apparait en 997 et designe '' fouace ''  et '' galette '' ');
       OutTextXY(10,204,'La pizza est composee d''une pate a pain etalee en cercle avec divers ingredients,');
       OutTextXY(10,216,'tels le fromage et la sauce tomate. ');
	Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,240,'La pate a pizza est composee d''eau, de sel, de farine de ble, de levure et');
       OutTextXY(10,252,'d''huile. En italien, le mot pizza au pluriel est pizze.');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,270,'Il y a beaucoup de sortes de pizza  comme la pizza Capricciosa ');
       OutTextXY(10,282,'(mozzarella, champignons, artichaut, jambon, olives, huile d''olive)');
       OutTextXY(10,294,'et  Margherita (tomate, mozzarella basilic, huile d''olive).');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDES ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECONDE ...');
       delay(1000);{Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TEMPS ECOULE!');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- Que signifiait le mot pizza?');      {Question 1 pizza}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) fougace et galette');
       OutTextXY(30,220,'b) fouace et galet'); OutTextXY(30,245,'c) fouace et galette');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'C': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- De quoi est composee la pate a pizza?');		{Question 2 pizza}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Eau, farine blanche, farine de ble, huile');
       OutTextXY(30,220,'b) Huile, sel, eau, levure, farine de ble');
        OutTextXY(30,245,'c) Eau, huile, oeuf, sel, levure');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3- Vrai ou faux :La pizza Margherita possede du jambon.');	{Question 3 pizza}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Vrai');
       OutTextXY(30,220,'b) Faux'); 
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	
  End;

  Procedure Question3Francais;  {Procedure de la 3e question en francais}
  	Begin
	cleardevice;
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 3');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);    {Texte sur l'hamburger}
       OutTextXY(10,180,'Le hamburger est un sandwich de viande hachee, de crudites et parfois de sauce. ');
       OuttextXY(10,192,'Le hamburger, aussi appele hambourgeois, ');
       OutTextXY(10,204,' est originaire de la ville d''Hambourg en Allemagne.');
       OutTextXY(10,216,' Aujourd''hui, le hamburger est connu a travers le monde');
	Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,240,'Le hamburger est surtout servi dans les restaurants rapides.');
       OutTextXY(10,252,'Plusieurs consommateurs, devenus obeses, ');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,270,' ont poursuivi en justice les restaurants vendant des hamburgers.  ');
       OutTextXY(10,282,'Le steak hache peut etre remplace par du poulet ou du poisson.');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDES ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDES ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECONDE ...');
       delay(1000); {Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TEMPS ECOULE!');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- Il peut y avoir, dans un hamburger,...');		{Question 1 hamburger}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) sauce, viande hachee et crudites');
       OutTextXY(30,220,'b) viande hachee et sauce'); OutTextXY(30,245,'c) viande hachee');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- Vrai ou faux: Le hamburger vient de la ville d''Hambourgeois');	{Question 2 hamburger}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Vrai');
       OutTextXY(30,220,'b) Faux');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3- Vrai ou faux :Le steak hache peut etre remplace par du jambon');    {Question 3 hamburger}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Vrai');
       OutTextXY(30,220,'b) Faux'); 
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	
   End;

  Procedure Question1Anglais;  {Procedure de la 1ere question en anglais}
  Begin
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 1');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);      {Texte sur la poutine (anglais)}
       OutTextXY(10,180,'Poutine is a typical meal from Quebec consisting of French fries,');
       OuttextXY(10,192,' topped with fresh cheddar cheese curds and covered with barbecue sauce. ');
       OutTextXY(10,204,'It originated in rural Quebec, in the late 1950''s.');
       Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,222,'The owner of a small restaurant, in the Acadian village of Warwick,');
       OutTextXY(10,234,'had the brilliant idea of adding cheese to his daily ''fry sauce''.');
       OutTextXY(10,246,' The word ''poutine'' is probably derived from the English word ''pudding''.');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,264,'There are many variations of poutine, the most famous being the Italian poutine,');
       OutTextXY(10,276,'in which the gravy is replaced with spaghetti sauce.');
       OutTextXY(10,288,'Another popular alternative is to add spicy sausage to the poutine');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDS ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECOND ...');
       delay(1000); {Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TIME''S UP!');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- What type of cheese is used in a poutine?');  {Question 1 poutine anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Mozzarella cheese');
       OutTextXY(30,220,'b) Swiss cheese'); OutTextXY(30,245,'c) Cheddar cheese');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'C': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- Where does the word ''poutine'' comes from?');  {Question 2 poutine anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) From Vladimir Putin, the Russian prime minister');
       OutTextXY(30,220,'b) From the English word ''Pudding''');
        OutTextXY(30,245,'c) From the name of a small Acadian village');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3-True or false:  An Italian poutine has spicy sausage in it. ');  {Question 3 poutine anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) True');
       OutTextXY(30,220,'b) False');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;

     End;

 Procedure Question2Anglais;  {Procedure de la 2eme question en anglais}
  Begin
	cleardevice;
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 2');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);    {Texte pizza anglais}
       OutTextXY(10,180,'The pizza is an Italian dish that has become popular all over the world. ');
       OuttextXY(10,192,'The word pizza appeared in 997 and means '' fouace '' and '' griddlecake ''.  ');
       OutTextXY(10,204,'The pizza is made with bread dough spread into a circle with various ingredients ,');
       OutTextXY(10,216,'such as cheese and tomato sauce. ');
	Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,240,'The pizza dough is made of water, salt, wheat flour, yeast and oil. ');
       OutTextXY(10,252,'In Italian, the word pizza in plural is pizze. ');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,270,'There are many kinds of pizza like the Capricciosa pizza ');
       OutTextXY(10,282,'(mozzarella, mushrooms, artichoke, ham, olives and olive oil)');
       OutTextXY(10,294,'and Margherita (tomato, mozzarella, basil and olive oil).');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDS ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECOND ...');
       delay(1000); {Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TIME''S UP!');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- What did the word ''pizza'' mean');  {Question 1 pizza anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) fouace and griddlecake');
       OutTextXY(30,220,'b) fougace and griddlecake '); OutTextXY(30,245,'c) None of the above');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- What are the pizza dough''s ingredients');  {Question 2 pizza anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Water, white flour, wheat flour, oil');
       OutTextXY(30,220,'b) Oil, salt, water, yeast, wheat flour');
        OutTextXY(30,245,'c) Water, oil, egg, salt, yeast');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3- True of False: Margherita pizza has ham in it'); {Question 3 pizza anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) True');
       OutTextXY(30,220,'b) False'); 
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'B': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	
  End;

   Procedure Question3Anglais;  {Procedure de la 3e question en anglais}
  	Begin
	cleardevice;
       Setfillstyle(1,lightgreen); bar(0,0,640,480);
       Settextstyle(2,0,10);setcolor(red); OutTextXY(200,200,'QUESTION 3');
       Rectangle(190,200,435,250); delay(1500);
       bar(0,0,640,480); rectangle(3,3,637,477); settextstyle(2,0,5);		{Texte hamburger anglais}
       OutTextXY(10,180,'The hamburger is a sandwich made of hash meat, vegetables, and sometimes sauce. ');
       OuttextXY(10,192,'The hamburger, also known as ''hamburgeois'', ');
       OutTextXY(10,204,' originated in the city of Hamburg in Germany. ');
       OutTextXY(10,216,' Today, the hamburger is known worldwide ');
	Setcolor(blue);   {change la couleur du texte}
       OutTextXY(10,240,'It is mainly served in fast food restaurants. ');
       OutTextXY(10,252,'Many consumers, who became obese,  ');
       Setcolor(darkgray); {change la couleur du texte}
       OutTextXY(10,270,' have sued the restaurants selling hamburgers.  ');
       OutTextXY(10,282,'The burger can also be substituted with chicken or fish.');
       Delay(10000);  {Apres 10 secondes, un avertissement apparait}
       Settextstyle(2,0,7); OutTextXY(20,340,'10 SECONDS ...');
       Delay(1000); bar(10,310,100,400); outtextxy(20,340,' 9 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 8 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 7 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 6 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 5 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 4 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 3 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 2 SECONDS ...');
       Delay(1000); bar(10,310,100,400);outtextxy(20,340,' 1 SECOND ...');
       delay(1000); {Apres 20 secondes, le temps est ecoule}
       Bar(5,5,635,450);Settextstyle(2,0,9); OutTextXY(200,200,'TIME''S UP');
       Rectangle(190,200,450,250); delay(2000);
       Bar(0,0,610,450); Settextstyle(2,0,6);

       OutTextXY(10,170,'1- A hamburger can be consisting of...');  {Question 1 hamburger anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) Sauce and hash meat');
       OutTextXY(30,220,'b) Hash meat and vegetables'); OutTextXY(30,245,'c) None of the above');
       GotoXY(30,20);
       M:=upcase(readkey);
	Case M of
        'C': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'2- True of false: The hamburger comes from the city of Hamburgeois'); {Question 2 hamburger anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) False');
       OutTextXY(30,220,'b) True');
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;
	setfillstyle(1,lightgreen);bar(0,0,640,480);

	OutTextXY(10,170,'3- True or false : The hash meat may be substituted with ham'); {Question 3 hamburger anglais}
       Settextstyle(2,0,5); OutTextXY(30,195,'a) True');
       OutTextXY(30,220,'b) False'); 
 	GotoXY(30,20); M:=upcase(readkey);
	Case M of
        'A': begin good; score:=score+20; end;
        else begin wrong; score:=score-10; end;
        end;

   End;

procedure scorefrancais; {Structure pour l'affichage du score en francais}
          begin
          closegraph;
          gotoxy(5,5);
          write('Alors ',name);
          gotoxy(10,6);
          write('Votre score est: ', score);
          gotoxy(1,10);
          write('Si vous voulez quitter, appuyez sur ''X'', ou appuyez sur une nimporte quelle touche pour recommencer.');
          case score of
             -100..0: Begin gotoxy(5, 8); write('Savez-vous lire?'); end;
              1..100: Begin gotoxy(5,8); write('Pas si mal...'); end;
              101..170: Begin gotoxy(5,8); write('Pas pire du tout!'); end;
              180: begin gotoxy(5,8); write('Vous etes un CAID!'); end;
          end;
          F:=upcase(readkey);
end;

procedure scoreanglais;   {Structure pour l'affichage du score (en anglais)}
          begin
          closegraph;
          gotoxy(5,5);
          write('So ',name);
          gotoxy(10,6);
          write('Your result is: ', score);
          gotoxy(1,10);
          write('If you want to quit, press ''X''. Press any other key to restart.');
          case score of
               -100..0: Begin gotoxy(5, 8); write('Do you know how to read?'); end;
                1..100: Begin gotoxy(5,8); write('Not bad...'); end;
                101..170: Begin gotoxy(5,8); write('Not bad at all'); end;
                180: begin gotoxy(5,8); write('You are a CAID!'); end;
          end;
          F:=upcase(readkey);
end;

Begin   {Structure finale du programmme}
 repeat
 pilote:= detect;
 initgraph(pilote,mode,'C:/BGI');
 delay(3000);
 score:=0; rayon:=0; rayon2:=0; s:=0; z:=0;  {Reset des variables}
 introcercles;
     repeat
     Layoutchoixlangue;
     case L of
       'A': begin textcolor(yellow); instructionsfrancais; question1francais; question2francais;question3francais;
            scorefrancais; end;
       'B': begin textcolor(red); instructionsanglais; question1anglais; question2anglais; question3anglais; scoreanglais; end;
       'X': exit;
     end;
     until (L='A') or (L='B'); {Pour s'assurer que le user choisisse A ou B dans le menu de langue}

 until (F='X'); {Pour que le programme recommence si il appuye une touche autre que X}
 instructionsfrancais;

 Closegraph;
End.