• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

The Game of Life - Please HELP!

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is my code...I was hoping I could get another pair of eyes to scan it and see what I might be doing wrong...All of my organisms die after the first cycle!

Any help would be appreciated!!!
Jason Candelora
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jason,
As I understand the rules here:

The number of live neighbors is always based on the cells before the rule was applied. In other words, we must first find all of the cells that change before changing any of them.


This means that you must have at least 2 boards in use. One that is the current state for checking and one that is being changed. After the change you can then make the changed one the current one.
In your case, it looks like you are only using one board which would explain why your oganisms are dying fast.
Regards,
Manfred.
 
jason candelora
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I appreciate the help!
reply
    Bookmark Topic Watch Topic
  • New Topic