public void load(File f) throws IOException {
		DOMParser parser = new DOMParser();
		if (f == null) {
			System.out.println("File is null!");
		}
		try {
			FileInputStream fis = new FileInputStream(f);
			InputSource s = new InputSource(fis);
			parser.parse(s);
		} catch (SAXException e) {
//			throw new IOException("XML Parsing exception: " + e);
		}
		try {
			Document doc = parser.getDocument();
			Node dim = doc.getElementsByTagName("DIMENSIONS").item(0);
			walls.clear();
			NamedNodeMap dim_attrs = dim.getAttributes();
			width = Integer.parseInt(dim_attrs.getNamedItem("width")
					.getNodeValue());
			height = Integer.parseInt(dim_attrs.getNamedItem("height")
					.getNodeValue());

			init();

			NodeList nodes = doc.getElementsByTagName("WALL");
			for (int i = 0; i < nodes.getLength(); i++) {
				Node e = nodes.item(i);
				NamedNodeMap attrs = e.getAttributes();
				double x1 = Double.valueOf(attrs.getNamedItem("x_1")
						.getNodeValue());
				double x2 = Double.valueOf(attrs.getNamedItem("x_2")
						.getNodeValue());
				double y1 = Double.valueOf(attrs.getNamedItem("y_1")
						.getNodeValue());
				double y2 = Double.valueOf(attrs.getNamedItem("y_2")
						.getNodeValue());
				walls.add(new Line2D.Double(x1, y1, x2, y2));
			}

		} catch (Exception e) {
			e.printStackTrace();
			throw new IOException("Problem loading board xml file: " + e);
		}

		// sanityCheck();

	}