public Board generateFromFile(String path)
	{
		try
		{
			FileInputStream fstream = new FileInputStream(path);
			BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
			
			String line = br.readLine();
			
			int size = Integer.parseInt(line);
			
			AState[][] map = new AState[size][size];
			line = br.readLine();
			int rowNum = 0;
			while(line != null && rowNum < size)
			{
				for(int colNum = 0; colNum < line.length() && colNum < size; colNum++)
				{
					char symbol = line.charAt(colNum);
					map[rowNum][colNum] = new AState(colNum, rowNum, symbol == 'x', symbol == 's', symbol == 'g');
				}
				
				rowNum++;
				line = br.readLine();
			}
			
			br.close();
			
			return new Board(map);
		}
		catch(IOException ex)
		{
			System.out.print("The input file doesn't exist " + ex.getMessage());
		}
		catch(NumberFormatException ex)
		{
			System.out.print(ex.getMessage());
		}
		
		return null;
	}