Difference between revisions of "CSC352 Game of Life Homework 2"
(→Format of the Text File) |
(→Problem 1) |
||
Line 6: | Line 6: | ||
# The number of threads it must generate | # The number of threads it must generate | ||
# The number of generations it must compute | # The number of generations it must compute | ||
− | # The name of the text file containing the first generation, | + | # The name of the text file containing the first generation, i.e. the first "dish." |
<br /> | <br /> | ||
==Format of the Text File== | ==Format of the Text File== |
Revision as of 16:47, 28 February 2017
--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:
- The number of threads it must generate
- The number of generations it must compute
- The name of the text file containing the first generation, i.e. 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 defines the beginning of a row of characters representing cells, spaces for dead cells, and #-signs for live ones.