Question: Could someone please fix my toString, saveToFile, and retrieveFile method so that they properly work. The saveToFile method should allow the user to save a
Could someone please fix my toString, saveToFile, and retrieveFile method so that they properly work. The saveToFile method should allow the user to save a game to the file directory with a name of their choice. Currently it only allows the user to access the file directlory and create a folder to store the game in but it does not save. The retrieveFromFile method does not work at all.This is not all the code but some of it
public class TetrisGame
private TetrisBrick fallingBrick;
private int rows ;
private int cols ;
private int numBrickTypes ;
private Random randomGen;
private int background;
private int state;
private int score;
public String toString
String gameFile;
forint row; row
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
