public static Board readBoard(Class<?extends Game> gameClass, BufferedReader in) throws IOException {
		HashMap<Location, Tile> tiles = null;
		String firstLine = in.readLine();
		Scanner sin = new Scanner(firstLine);
		String validationStr = sin.next();
		if(!validationStr.equals("MAP"))
			throw new IllegalArgumentException("bad map format, must begin with 'MAP '");  
		//TODO: use a better exception model, generate error messages for command-line use
		int columns = sin.nextInt();
		int rows = sin.nextInt();
		tiles = new HashMap<Location, Tile>();
		Board board = new Board(rows, columns, tiles);
		String line = null; 
		int row;
		for(row=1; row <= rows; row++) {
			line = in.readLine();
			if(line == null) 
				throw new IllegalArgumentException("bad map format, wrong number of rows");
			if(columns != line.length())
				throw new IllegalArgumentException("bad map format, non-uniform row lengths");
			for(int col=1; col<=columns; col++) {
				Location l = new Location(col, row);
				Tile t = Tile.readTile(gameClass, line.charAt(col-1), board, l);
				tiles.put(l, t);
			}
		}
		return board;
	}