CSC352 Game of Life Homework 2

From dftwiki3
Revision as of 16:45, 28 February 2017 by Thiebaut (talk | contribs) (Format of the Text File)
Jump to: navigation, search

--D. Thiebaut (talk) 16:06, 28 February 2017 (EST)


Problem 1


Write a threaded java program that computes the generations of the game of life. The program should get 3 different pieces of information from the command line:

  1. The number of threads it must generate
  2. The number of generations it must compute
  3. The name of the text file containing the first generation, or the first "dish."


Format of the Text File


The original dish is stored in a text file using the following format:

"                                                                                  "
"   #                                                                              "
" # #                                            ###                               "
"  ##                                                                              "
"                                                                                  "
"                                                      #                           "
"                                                    # #                           "
"                                                     ##                           "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"             #                                                                    "
"           # #                                                                    "
"            ##                                                                    "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "
"                                                                                  "

Each line of the dish array is defined by 2 double quotes. The first double-quote is the