question: public static boolean hasValidCover ( IGame game , Coords pos , int elevation ) { if ( ( pos == null ) || ( elevation > 0 ) ) { return false ; } boolean hasMovedEntity = false ; for ( Entity e : game . getEntitiesVector ( pos ) ) { if ( e . isDone ( ) && ! ( e instanceof Infantry ) && ( e . getElevation ( ) == elevation ) ) { hasMovedEntity = true ; break ; } } if ( ! hasMovedEntity ) { Enumeration < Entity > wrecks = game . getWreckedEntities ( ) ; while ( wrecks . hasMoreElements ( ) ) { Entity e = wrecks . nextElement ( ) ; if ( pos . equals ( e . getPosition ( ) ) && ! ( e instanceof Infantry ) ) { hasMovedEntity = true ; } } } return hasMovedEntity ; }
target:  Determines if there is valid cover for an infantry unit to utilize the Using Non-Infantry as Cover rules (TO pg 108).