private void loadMap(BufferedReader br) {
		boolean canLoad = false;
		String str = null;
		Grid<T> gr = world.getGrid();
		for (Location loc : gr.getOccupiedLocations())
			world.remove(loc);
		repaint();
		try {
			str = br.readLine();
			if (str.equals("unbounded")) {
				if (gr.getNumCols() == -1 && gr.getNumRows() == -1) {
					canLoad=true;
				}else{
					JOptionPane.showMessageDialog(null, "Please select the unbounded grid to load this map.");
				}
			} else {
				if (gr.getNumCols() == -1 && gr.getNumRows() == -1) {
					JOptionPane.showMessageDialog(null, "Please select the bounded grid(10,10) to load this map.");
				}else{
					canLoad=true;
				}
			}
			while (((str = br.readLine()) != null) && canLoad) {
				String[] para = new String[4];
				para = str.split("\t");
				Color aColor = actorColor(para[3]);
				int direction = actorDirection(para[2]);
				Location loc = actorLocation(para[1]);
				Actor act = newActor(para[0]);
				act.setColor(aColor);
				act.setDirection(direction);
				world.add(loc, (T) act);
				
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}