src/gameplayer/controller/GameManager.java
private static void extractInfo(Map<Integer, Map<String, Component>> entities, int levelNum){
		entities.forEach((key, value) -> {
            if (value.containsKey(Player.KEY)) {
                playerKeys.put(levelNum, value);
                livesMap.put(levelNum, (int) ((Lives) value.get(Lives.KEY)).getData());
                //we know player must have x/y coordinates (for now)
                startingXPositionMap.put(levelNum, ((XPosition) value.get(XPosition.KEY)).getData());
                startingYPositionMap.put(levelNum, ((YPosition) value.get(YPosition.KEY)).getData());
            }

            if (value.containsKey(Win.KEY)) {
                winKeys.put((Win) value.get(Win.KEY), levelNum);
            }
		});
	}
/**
	 * Extracts player and win components from each level
	 * @param entities
	 * @param levelNum
	 */
Extracts player and win components from each level
@param entities
@param levelNum
Extracts player and win components from each level @param entities @param levelNum
private static void extractInfo(Map<Integer, Map<String, Component>> entities, int levelNum){
		entities.forEach((key, value) -> {
            if (value.containsKey(Player.KEY)) {
                playerKeys.put(levelNum, value);
                livesMap.put(levelNum, (int) ((Lives) value.get(Lives.KEY)).getData());
                startingXPositionMap.put(levelNum, ((XPosition) value.get(XPosition.KEY)).getData());
                startingYPositionMap.put(levelNum, ((YPosition) value.get(YPosition.KEY)).getData());
            }
            if (value.containsKey(Win.KEY)) {
                winKeys.put((Win) value.get(Win.KEY), levelNum);
            }
		});
	}
private static void extractInfo ( Map < Integer , Map < String , Component > > entities , int levelNum ) { entities . forEach ( ( key , value ) -> { if ( value . containsKey ( Player . KEY ) ) { playerKeys . put ( levelNum , value ) ; livesMap . put ( levelNum , ( int ) ( ( Lives ) value . get ( Lives . KEY ) ) . getData ( ) ) ; startingXPositionMap . put ( levelNum , ( ( XPosition ) value . get ( XPosition . KEY ) ) . getData ( ) ) ; startingYPositionMap . put ( levelNum , ( ( YPosition ) value . get ( YPosition . KEY ) ) . getData ( ) ) ; } if ( value . containsKey ( Win . KEY ) ) { winKeys . put ( ( Win ) value . get ( Win . KEY ) , levelNum ) ; } } ) ; }
Extracts player and win components from each level
 @param entities
 @param levelNum
Extracts player and win components from each level @param entities @param levelNum
//we know player must have x/y coordinates (for now)