src/gameplayer/hud/HUDFactory.java
public List<IGameStatusLabel> create(List<String> listOfStates) {
		IGameStatusLabel gameStatus = null;
		List<IGameStatusLabel> listOfLabels = new ArrayList<IGameStatusLabel>();
		System.out.println(listOfLabels.size());
		for (String temp: listOfStates) {
			try {
				System.out.println(temp);
				gameStatus = (IGameStatusLabel) Class.forName("gameplayer.labels."+temp+"Label").newInstance();
			}catch (InstantiationException e) {
				System.out.println("Error");
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			listOfLabels.add(gameStatus);
		}
		return listOfLabels;
	}
/**
	 * Reflectively creates and returns a heads up display with the correct the correct labels.
	 * @param listOfStates
	 * @return
	 */
Reflectively creates and returns a heads up display with the correct the correct labels.
Reflectively creates and returns a heads up display with the correct the correct labels .
public List<IGameStatusLabel> create(List<String> listOfStates) {
		IGameStatusLabel gameStatus = null;
		List<IGameStatusLabel> listOfLabels = new ArrayList<IGameStatusLabel>();
		System.out.println(listOfLabels.size());
		for (String temp: listOfStates) {
			try {
				System.out.println(temp);
				gameStatus = (IGameStatusLabel) Class.forName("gameplayer.labels."+temp+"Label").newInstance();
			}catch (InstantiationException e) {
				System.out.println("Error");
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			}
			listOfLabels.add(gameStatus);
		}
		return listOfLabels;
	}
public List < IGameStatusLabel > create ( List < String > listOfStates ) { IGameStatusLabel gameStatus = null ; List < IGameStatusLabel > listOfLabels = new ArrayList < IGameStatusLabel > ( ) ; System . out . println ( listOfLabels . size ( ) ) ; for ( String temp : listOfStates ) { try { System . out . println ( temp ) ; gameStatus = ( IGameStatusLabel ) Class . forName ( "gameplayer.labels." + temp + "Label" ) . newInstance ( ) ; } catch ( InstantiationException e ) { System . out . println ( "Error" ) ; } catch ( IllegalAccessException e ) { e . printStackTrace ( ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } listOfLabels . add ( gameStatus ) ; } return listOfLabels ; }
Reflectively creates and returns a heads up display with the correct the correct labels.
Reflectively creates and returns a heads up display with the correct the correct labels .
// TODO Auto-generated catch block // TODO Auto-generated catch block