home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Graphics / VideoEasel / CAMRexx / Life.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-30  |  510b  |  23 lines

  1. /* CAMRexx-script for the "Game of Life" with echo */
  2.  
  3. MakeAlgorithm:
  4.    if plane=0 then
  5.       PLANEALGORITHM moore centers
  6.    if plane=1 then
  7.       PLANEALGORITHM echo center0
  8. return
  9.  
  10. MakePlane:
  11.    if plane=0 then; do
  12.      sum8=north+south+west+east+n_west+n_east+s_west+s_east
  13.      if center=0 then; do
  14.         if sum8=3 then SETPLANE on
  15.         else           SETPLANE off
  16.      end; else; do;
  17.         if sum8=2 | sum8=3 then SETPLANE on
  18.         else                    SETPLANE off
  19.      end
  20.    end;
  21. return
  22.  
  23.