Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
suchetavs committed Dec 1, 2019
1 parent f3e052d commit 2394b6f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Binary file modified Documents/REFACTORING LIST.docx
Binary file not shown.
Binary file removed Documents/~$FACTORING LIST.docx
Binary file not shown.
5 changes: 2 additions & 3 deletions src/com/concordia/riskgame/controller/CommandController.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,7 @@ public static void saveMap(String command)
}

public static void loadGame(String command){
String fileName = command.split(" ")[1];
// System.out.println("hello"+" "+fileName);
String fileName = Constants.saveLocation+command.split(" ")[1];
FileInputStream fs = null;
try {
fs = new FileInputStream(fileName);
Expand Down Expand Up @@ -1016,7 +1015,7 @@ public static void saveGame()
String saveFilename=ScannerUtil.sc.nextLine();


FileOutputStream fs = new FileOutputStream("./Saved_Games/" + saveFilename + ".bin");
FileOutputStream fs = new FileOutputStream(Constants.saveLocation + saveFilename + ".bin");
ObjectOutputStream os = new ObjectOutputStream(fs);
try {
os.writeObject(Gameplay.getInstance());
Expand Down
1 change: 1 addition & 0 deletions src/com/concordia/riskgame/utilities/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ public class Constants {
public static final Border blackline = BorderFactory.createLineBorder(Color.black);
public static final String mapLocation=System.getProperty("user.dir")+"\\Maps\\Valid_Maps\\";
public static final String mapType="Domination";
public static final String saveLocation="./Saved_Games/";
}

0 comments on commit 2394b6f

Please sign in to comment.