return null;
String attrStr = null; int attrVal = 0; Board retVal = null; Vector buildings = new Vector(); Hashtable infernos = new Hashtable(); int height = 0; int width = 0; Hex[] hexes = null; boolean roadsAutoExit = false;   if ( null == node ) { throw new IllegalArgumentException( "The board is null." ); }   if ( !node.getName().equals( "board" ) ) { throw new IllegalStateException( "Not passed a board node." ); }     Enumeration children = node.elements(); while ( children.hasMoreElements() ) { ParsedXML child = (ParsedXML) children.nextElement();   if ( child.getName().equals( "boardData" ) ) {   if ( null != retVal ) { throw new IllegalStateException ( "More than one 'boardData' node in a board node." ); }   attrStr = child.getAttribute( "height" ); if ( null == attrStr ) { throw new IllegalStateException ( "Couldn't decode the boardData for a board node." ); }   try { attrVal = Integer.parseInt( attrStr ); } catch ( NumberFormatException exp ) { throw new IllegalStateException ( "Couldn't get an integer from " + attrStr ); }   if ( height < 0 || height > Board.BOARD_MAX_HEIGHT ) { throw new IllegalStateException ( "Illegal value for height: " + attrStr ); } height = attrVal;   attrStr = child.getAttribute( "width" ); if ( null == attrStr ) { throw new IllegalStateException ( "Couldn't decode the boardData for a board node." ); }   try { attrVal = Integer.parseInt( attrStr ); } catch ( NumberFormatException exp ) { throw new IllegalStateException ( "Couldn't get an integer from " + attrStr ); }   if ( width < 0 || width > Board.BOARD_MAX_WIDTH ) { throw new IllegalStateException ( "Illegal value for width: " + attrStr ); } width = attrVal;   roadsAutoExit = Boolean.getBoolean ( child.getAttribute( "roadsAutoExit" ) );   hexes = new Hex[height * width];   int numHexes = 0; Enumeration subnodes = child.elements(); while ( subnodes.hasMoreElements() ) {   ParsedXML subnode = (ParsedXML) subnodes.nextElement(); if ( subnode.getName().equals( "hex" ) ) {   if ( hexes.length == numHexes ) { throw new IllegalStateException ( "Too many hexes in a board node." ); }   hexes[numHexes] = HexEncoder.decode( subnode, game );   numHexes++;  }  }   if ( numHexes < hexes.length ) { throw new IllegalStateException ( "Not enough hexes in a board node." ); }  }  }      retVal = new Board( width, height, hexes, buildings, infernos );  try { retVal.save( new FileOutputStream("retVal.board") ); } catch ( IOException ioErr ) { ioErr.printStackTrace(); }    return retVal;
    public static Board decode( ParsedXML node, Game game ) {        return null;    }