home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TPROUTN.ZIP / TURBLE.LBR / FIGDEMO.PQS / figdemo.pas
Encoding:
Pascal/Delphi Source File  |  1985-03-03  |  1.5 KB  |  68 lines

  1. {$I turble.pas}
  2. {$I turble2.pas}
  3.  
  4. Procedure Menu;
  5.  
  6. begin
  7.   GotoXY(27,3);
  8.   Write('Choose from these figures:');
  9.   GotoXy(32,5);
  10.   Write('1.  Tree');
  11.   GotoXy(32,7);
  12.   Write('2.  Star');
  13.   GotoXy(32,9);
  14.   Write('3.  Snowflake');
  15.   GotoXy(32,11);
  16.   Write('4.  Inverted Spirals');
  17.   GotoXy(32,13);
  18.   Write('5.  Spiral');
  19.   GotoXy(32,15);
  20.   Write('6.  Polygon');
  21.   GotoXy(32,17);
  22.   Write('7.  Slinky');
  23.   GotoXy(32,19);
  24.   Write('8.  End');
  25.   GotoXy(20,21);
  26.   Write('Press space bar to stop continuous figures');
  27.   GotoXy(27,22);
  28.   Write('or any other key to continue.');
  29. end;
  30.  
  31. Var
  32.   Choice : Char;
  33.   Number : Integer;
  34.  
  35. Label Exit;
  36.  
  37. begin
  38.   Choice := '9';
  39.   While Choice <> '8' do
  40.   begin
  41.     TextColor(Random(15) + 1);
  42.     Menu;
  43.     gotoxy(53,3);
  44.     Read(Kbd,Choice);
  45.     Randomize;
  46.     Mode(CMR);
  47.     Palettor(Random(4));
  48.     Pencolor(Random(3) + 1);
  49.     Case Choice of
  50.       '1' : Tree(Random(75) + 35);
  51.       '2' : Spiral(5,144,2 * Random(4) + 3);
  52.       '3' : SnowFlake(Random(100) + 100,3);
  53.       '4' : InSpiral(6,10,Random(16));
  54.       '5' : Spiral(1,45,Random(2)+1);
  55.       '6' : Poly(Random(7) + 3,Random(40) + 10);
  56.       '7' : Slinky(Random(30) + 10,Random(40) - 20);
  57.       ' '..'0' : Goto Exit;
  58.       '9'..'~' : Goto Exit;
  59.     end;
  60.     If Choice <> '8' then read(Kbd,Choice);
  61.     If Choice = ' ' then read(Kbd,Choice);
  62.     exit : mode(C80);
  63.   end;
  64. end.
  65.  
  66.  
  67.  
  68.