cvsuser     05/03/26 14:53:58

  Modified:    languages/cola/examples life.cola
  Log:
  Add output to screen. Need to convert this to curses.
  
  Revision  Changes    Path
  1.5       +11 -10    parrot/languages/cola/examples/life.cola
  
  Index: life.cola
  ===================================================================
  RCS file: /cvs/public/parrot/languages/cola/examples/life.cola,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- life.cola 13 Apr 2002 03:50:55 -0000      1.4
  +++ life.cola 26 Mar 2005 22:53:58 -0000      1.5
  @@ -35,26 +35,27 @@
       static void Main() {
           string world = "   **   * * *   " +
                       " **  *  *       " +
  -                    " **          *  " +
  +                    "             *  " +
                       "        *    ** " +
  -                    " **  *  *       " +
  -                    "     *          " +
                       "  *     *       " +
  +                    "     ****       " +
  +                    "     ****       " +
                       "        *       " +
  -                    " *   *   *  **  " +
  -                    "  *  *  *       " +
  -                    " **     *    *  " +
  +                    "         *  **  " +
  +                    "     *  *       " +
  +                    "        *    *  " +
                       "          *     " +
  -                    "  *             " +
  -                    " *          *   " +
  +                    "                " +
  +                    "            *   " +
                       "     *          " +
                       "     *         *"
                       ;
           int i, j;
           for(i = 0; i < 500; i++) {
               // Print World
  -            //for(j = 0; j < 16; j++)
  -            //    puts(substr(world, j * 16, 16) + "\n");
  +            for(j = 0; j < 16; j++)
  +                puts(substr(world, j * 16, 16) + "\n");
  +            puts("----------------\n");
               world = Generate(world);
           }
       }
  
  
  

Reply via email to