Question: Create a java method that builds a game board from the input file ( initial game pattern ) . You have been provided some input

Create a java method that builds a game board from the input file(initial game pattern). You have been provided some input files to test this method (input1.txt, input2.txt, input3.txt). The format is as follows:
One line containing the number of rows in the board game
One line containing the number of columns in the board game
Several lines (one for each row) containing the cell state (false for dead, true for alive) for each column in the board, space separated
Use the StdIn library to read from a file:
StdIn.setFile(filename) opens a file to be read
StdIn.readInt() reads the next integer value from the opened file (weather the value is in the current line or in the next line)
StdIn.readBoolean() read the next boolean value from the opened file (weather the value is in the current line or in the next line)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!