home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Snippets / TruchetTiles / Truchet.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-08-09  |  4.5 KB  |  21 lines  |  [TEXT/PJMM]

  1. unit truchet;
  2. interface
  3.     uses
  4.         PrintTraps, Quickdraw, Picker, Palettes, Globs, DlogStuff;
  5.  
  6.  
  7.     procedure DoTruchet;        {do graphic display of Truchet Tiles}
  8.  
  9. implementation
  10.  
  11. {===========================================================================}
  12.     procedure DoATile (theBox: rect);        {Draw a single tile}
  13.         var
  14.             k, f: integer;
  15.             garbageBox: rect;
  16.             halfBox: integer;
  17.             thisOrThat: boolean;    {which of the two tiles to do}
  18.     begin
  19.         halfBox := gdh^^.TileSize div 2;
  20.  
  21.         if gdh^^.randomness = 0 then                {if ther