Solutions

1. boat.png (10,10), (11, 10), (10, 11), (12, 11), (11, 12)


This program is a C++ implementation of John Conway's Game of Life.
Welcome to LIFE.  Enter row and column where 1<=column<=80 and 1<=row<=22.  Enter x of -1 to end.
Enter x y coordinate #1: 10 10
Enter x y coordinate #2: 11 10
Enter x y coordinate #3: 10 11
Enter x y coordinate #4: 12 11
Enter x y coordinate #5: 11 12
Enter x y coordinate #6: -1
         **                                                                     
         * *                                                                    
          *                                                                     
#################
Generation 0:
#################

         **                                                                     
         * *                                                                    
          *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 1:
#################

         **                                                                     
         * *                                                                    
          *                  

2. glider.png


This program is a C++ implementation of John Conway's Game of Life.
Welcome to LIFE.  Enter row and column where 1<=column<=80 and 1<=row<=22.  Enter x of -1 to end.
Enter x y coordinate #1: 10 10
Enter x y coordinate #2: 10 11
Enter x y coordinate #3: 10 12
Enter x y coordinate #4: 11 10 
Enter x y coordinate #5: 12 11
Enter x y coordinate #6: -1
         ***                                                                    
         *                                                                      
          *                                                                     
#################
Generation 0:
#################

         ***                                                                    
         *                                                                      
          *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 1:
#################

          *                                                                     
         **                                                                     
         * *                                                                    
Would you like to run another generation? (y/n): y
#################
Generation 2:
#################

         **                                                                     
         * *                                                                    
         *                                                                      
Would you like to run another generation? (y/n): y
#################
Generation 3:
#################

         **                                                                     
        **                                                                      
          *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 4:
#################

        ***                                                                     
        *                                                                       
         *                                                                      
Would you like to run another generation? (y/n): y
#################
Generation 5:
#################

         *                                                                      
        **                                                                      
        * *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 6:
#################

        **                                                                      
        * *                                                                     
        *                                                                       
Would you like to run another generation? (y/n): y
#################
Generation 7:
#################

        **                                                                      
       **                                                                       
         *                                                                      
Would you like to run another generation? (y/n): y
#################
Generation 8:
#################

       ***                                                                      
       *                                                                        
        *                                                                       
Would you like to run another generation? (y/n): y
#################
Generation 9:
#################

        *                                                                       
       **                                                                       
       * *                                                                      
Would you like to run another generation? (y/n): y
#################
Generation 10:
#################

       **                                                                       
       * *                                                                      
       *                                                                        
Would you like to run another generation? (y/n): 

3. f.png (10,11),(10,12),(11,10),(11,11),(12,11)


This program is a C++ implementation of John Conway's Game of Life.
Welcome to LIFE.  Enter row and column where 1<=column<=80 and 1<=row<=22.  Enter x of -1 to end.
Enter x y coordinate #1: 10 11 
Enter x y coordinate #2: 10 12 
Enter x y coordinate #3: 11 10
Enter x y coordinate #4: 11 11
Enter x y coordinate #5: 12 11
Enter x y coordinate #6: -1
          **                                                                    
         **                                                                     
          *                                                                     
#################
Generation 0:
#################

          **                                                                    
         **                                                                     
          *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 1:
#################

         ***                                                                    
         *                                                                      
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 2:
#################

          *                                                                     
         **                                                                     
        *  *                                                                    
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 3:
#################

         **                                                                     
         ***                                                                    
        *  *                                                                    
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 4:
#################

         * *                                                                    
        *  *                                                                    
        *  *                                                                    
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 5:
#################

          *                                                                     
        ** **                                                                   
        *  *                                                                    
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 6:
#################

         ***                                                                    
        ** **                                                                   
        *  **                                                                   
         **                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 7:
#################

          *                                                                     
        ** **                                                                   
        *                                                                       
        *   *                                                                   
         ***                                                                    
Would you like to run another generation? (y/n): y
#################
Generation 8:
#################

         ***                                                                    
        ****                                                                    
       **  **                                                                   
        * **                                                                    
         ***                                                                    
          *                                                                     
Would you like to run another generation? (y/n): y
#################
Generation 9:
#################

          *                                                                     
        *  *                                                                    
       *                                                                        
       *    *                                                                   
       **                                                                       
         ***                                                                    
Would you like to run another generation? (y/n): y
#################
Generation 10:
#################

       **                                                                       
      **                                                                        
       **                                                                       
        ***                                                                     
          *                                                                     
          *                                                                     
Would you like to run another generation? (y/n): 


This topic: SCMP118/Fall2016 > WebHome > Lab7Kenyon > SsdSolutions
Topic revision: r1 - 2018-05-10 - JimSkon
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback