EDIT: I just realized my original post was mildly overwhelming, so if anyone can tell me how to write a list of booleans to a .txt file and then later read that file and get the list of booleans, I can figure the rest out on my own. Thank you so much!
Hi, I'm working on a lab for my computer science course and am having some difficulties attempting to save and load files. I've created an application that runs the game of life, and I'm attempting to create a function that saves the current pattern onscreen. My application is based off a two-dimensional array of cells that contain a boolean value specifying whether the cell is alive or dead. I'm trying to use a FileWriter to write all the boolean values to a .txt file, then use a FileReader to read the .txt file and set all the cells in the array to the boolean values saved in the .txt file. I'm really shaky on the whole FileWriter/FileReader concept because it's extra credit so my prof hasn't gone over it, so I'd really appreciate any ideas on how to code this.
Hi, I'm working on a lab for my computer science course and am having some difficulties attempting to save and load files. I've created an application that runs the game of life, and I'm attempting to create a function that saves the current pattern onscreen. My application is based off a two-dimensional array of cells that contain a boolean value specifying whether the cell is alive or dead. I'm trying to use a FileWriter to write all the boolean values to a .txt file, then use a FileReader to read the .txt file and set all the cells in the array to the boolean values saved in the .txt file. I'm really shaky on the whole FileWriter/FileReader concept because it's extra credit so my prof hasn't gone over it, so I'd really appreciate any ideas on how to code this.