public static Entity decode( ParsedXML node, Game game ) {
public static Entity decode( ParsedXML node, IGame game ) {
    public static Entity decode( ParsedXML node, Game game ) {        BipedMech entity = null;        String attrStr;        int attrVal;        // Did we get a null node?        if ( null == node ) {            throw new IllegalArgumentException( "The BipedMech node is null." );        }        // Make sure that the node is for an Mech unit.        attrStr = node.getAttribute( "name" );        if ( !node.getName().equals( "class" ) ||             null == attrStr || !attrStr.equals( "BipedMech" ) ) {            throw new IllegalStateException( "Not passed a BipedMech node." );        }        // TODO : perform version checking.        // Create the entity.        entity = new BipedMech();        // Walk the board node's children.        Enumeration children = node.elements();        while ( children.hasMoreElements() ) {            ParsedXML child = (ParsedXML) children.nextElement();            String childName = child.getName();            // Handle null child names.            if ( null == childName ) {                // No-op.            }            // Did we find the stunnedTurns node?            else if ( childName.equals( "mascTurns" ) ) {                // Get the Mech's stunned turns.                attrStr = child.getAttribute( "value" );                if ( null == attrStr ) {                    throw new IllegalStateException                        ( "Couldn't decode the mascTurns for a BipedMech unit." );                }                // Try to pull the number from the attribute string                try {                    attrVal = Integer.parseInt( attrStr );                }                catch ( NumberFormatException exp ) {                    throw new IllegalStateException                        ( "Couldn't get an integer from " + attrStr );                }                entity.setMASCTurns( attrVal );            }            // Did we find the mascUsed node?            else if ( childName.equals( "mascUsed" ) ) {                // See if the Mech used MASC.                attrStr = child.getAttribute( "value" );                if ( null == attrStr ) {                    throw new IllegalStateException                        ( "Couldn't decode mascUsed for a BipedMech unit." );                }                // If the value is "true", the Mech used MASC.                if ( attrStr.equals( "true" ) ) {                    entity.setMASCUsed( true );                }            }        } // Handle the next element.        // Return the entity.        return entity;    }