public static void main(String[] args) {
		if (args.length != 1) {
			System.out.println("Usage: java Chess input-file");
			System.exit(0);
		}


		String inputFileName = args[0];
		BufferedReader reader = null;
		try {
			reader = new BufferedReader(new FileReader(inputFileName));
		} catch (IOException e) {
			System.out.println(e);
			e.printStackTrace();
		}
		String firstLine = null;
		try {
			firstLine = reader.readLine();
		} catch (IOException e) {
			System.out.println(e);
			e.printStackTrace();
		}
		String[] rcList = firstLine.split("\\s+");
		BOARD_ROWS = Integer.parseInt(rcList[0]);
		BOARD_COLS = Integer.parseInt(rcList[1]);
		ChessConfig startConfig = null;
		String currentLine = "";
		int numPieces = 0;
		ChessPiece[][] board = new ChessPiece[BOARD_ROWS][BOARD_COLS];
		try {
			for (int i=0;i<BOARD_ROWS;i++) {
				currentLine = reader.readLine();
				String[] tempList = currentLine.split("\\s+");
				for (int j=0; j<Chess.BOARD_COLS;j++) {
					board[i][j] = makePiece(tempList[j]);
					if (board[i][j] != ChessPiece.EMPTY) numPieces++;
				}
			}
		} catch (IOException e) {
			System.out.println(e);
			e.printStackTrace();
		}

		startConfig = new ChessConfig(board, numPieces);
		Chess game = new Chess(startConfig);
		Solver solver = new Solver(game);
		ArrayList<Config> path = solver.solve();
		if (path == null) System.out.println("No solution.");
		else for (Config c : path) System.out.println("Step " + path.indexOf(c) + ":" + c + "\n");

		ChessFrame gui = new ChessFrame("Solitare Chess   Dylan Bannon <drb2857>", game);
	}