src/authoring/gamestate/AuthoringStateLoader.java
public List<File> findFilesForGame(String gameName) {
		List<File> gameEntities = new ArrayList<>();
		Document d;
		File[] filesToSearch = new File(ENTITY_FOLDER).listFiles();
		for (File poss : filesToSearch) {
			try {
				d = documentBuilder.parse(poss);
				Element e = d.getDocumentElement();
				if (e.getAttribute(ATTRIBUTE_NAME).equals(gameName)) {
					gameEntities.add(poss);
				}
			} catch (SAXException | IOException e) {
				throw new AuthoringException(e, AuthoringAlert.NO_SHOW);
			}
		}
		return gameEntities;
	}
/**
	 * Finds all of the files that pertain to a specific game.
	 * @param gameName the name of the game to search for
	 * @param filesToSearch the files to search through for the given game type
	 * @return a list of files that pertain to a given game
	 */
Finds all of the files that pertain to a specific game.
@param gameName the name of the game to search for
@param filesToSearch the files to search through for the given game type
@return a list of files that pertain to a given game
Finds all of the files that pertain to a specific game . @param gameName the name of the game to search for @param filesToSearch the files to search through for the given game type @return a list of files that pertain to a given game
public List<File> findFilesForGame(String gameName) {
		List<File> gameEntities = new ArrayList<>();
		Document d;
		File[] filesToSearch = new File(ENTITY_FOLDER).listFiles();
		for (File poss : filesToSearch) {
			try {
				d = documentBuilder.parse(poss);
				Element e = d.getDocumentElement();
				if (e.getAttribute(ATTRIBUTE_NAME).equals(gameName)) {
					gameEntities.add(poss);
				}
			} catch (SAXException | IOException e) {
				throw new AuthoringException(e, AuthoringAlert.NO_SHOW);
			}
		}
		return gameEntities;
	}
public List < File > findFilesForGame ( String gameName ) { List < File > gameEntities = new ArrayList < > ( ) ; Document d ; File [ ] filesToSearch = new File ( ENTITY_FOLDER ) . listFiles ( ) ; for ( File poss : filesToSearch ) { try { d = documentBuilder . parse ( poss ) ; Element e = d . getDocumentElement ( ) ; if ( e . getAttribute ( ATTRIBUTE_NAME ) . equals ( gameName ) ) { gameEntities . add ( poss ) ; } } catch ( SAXException | IOException e ) { throw new AuthoringException ( e , AuthoringAlert . NO_SHOW ) ; } } return gameEntities ; }
Finds all of the files that pertain to a specific game.
Finds all of the files that pertain to a specific game .