• Post Reply Bookmark Topic Watch Topic
  • New Topic

Game of life - coding from book  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to mess around with some code in my java book. I entered the code just as how it is in the book and it compiles, but it seems to never finish running. Is there something wrong with the coding that is causing it to never finish and print any output? Here is the code:

 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's look at the code together, OK? The first routine, of course, is "main()". What main does is declare and initialize a few variables, and then call readInitialGeneration().

readInitialGeneration() loops over the boolean array that's passed in, and does what, now?



Start typing, boy!
 
MP Olsen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lol, I typed that code in so quick and looked at it and didn't realize that at all. The book didn't mention anything about inputing the symbols, and I never payed attention to that line when I coded it. Guess I'll have to edit it so I don't gotta type anything in.

Thanks for pointing out my ignorance, lol.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!