public void loadMap(String name){
	tiletypes = new ArrayList<Character>();
	try {

      String dir = "/resources/";
	    String imagefile1 = "bush.png";
	    String imagefile2 = "grass.png";
		  String imagefile3 = "stone.PNG";
	    URL url = (getClass().getResource(dir+name));

	    if(GameGui.debug){
		System.out.println("dir + name = " + (dir + name));
		System.out.println("url = " + url);  }

	    Scanner scanner = new Scanner(getClass().getResourceAsStream(dir+ name));

	    BufferedImage grassTile = ImageIO.read(getClass().getResource("/resources/grass.png"));
	    BufferedImage bushTile = ImageIO.read(getClass().getResource("/resources/bush.png"));
		  BufferedImage stoneTile = ImageIO.read(getClass().getResource("/resources/stone.PNG"));
	    tilesWidth = scanner.nextInt();
	    tilesHeight = scanner.nextInt();
	    String temp;
	    tiles = new ArrayList<BufferedImage>();
	    while (scanner.hasNext()) {
		temp = scanner.nextLine();
		if(temp.equals(("G"))) {
		    tiles.add(grassTile);
		    tiletypes.add('G');
		}
		if(temp.equals(("B"))) {
		    tiles.add(bushTile);
		    tiletypes.add('B');
		}
		if(temp.equals(("S"))) {
		    tiles.add(stoneTile);
		    tiletypes.add('S');
		}
	    }

	} catch (IOException e) {
	    e.printStackTrace();}

    }