-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.java
22 lines (19 loc) · 920 Bytes
/
Game.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public class Game {
public static String[][] board(String boardFile){ // board txt to map
String gameBoard[][] = FileReader.fileReader(boardFile);
for(int i =0;i< gameBoard.length;i++){
for(int j =0; j < gameBoard[i].length;j++){
WriteOutput.write(gameBoard[i][j]+" "); // writing game board to output.txt
System.out.print(gameBoard[i][j]+" ");
}
WriteOutput.write("\n");
System.out.println();
}
return gameBoard; }
public static String[][] initialBoard(String boardFile){ // board txt to map for the main
String gameBoard[][] = FileReader.fileReader(boardFile);
return gameBoard; }
public static String[] commentLine(String commentFile){ // movement list for the main
String[] comment= FileReader.fileReader(commentFile)[0]; //
return comment;}
}