src/drone.cpp
/*
 * Find out whether a room contains at least one target
 * */
Find out whether a room contains at least one target
Find out whether a room contains at least one target
bool DRONE::TargetIn(const DRONE_STATE &droneState, int cell) const {
    COORD coord = Grid.Coord(cell);
    bool found = false;
    for(int i=0; i < droneState.Features.size() && !found; i++) {
        if (droneState.Features[i].Position == coord && droneState.Features[i].Target){ 
            found = true;
        }
    }
    return found;
}
bool DRONE :: TargetIn ( const DRONE_STATE & droneState , int cell ) const { COORD coord = Grid . Coord ( cell ) ; bool found = false ; for ( int i = 0 ; i < droneState . Features . size ( ) && ! found ; i ++ ) { if ( droneState . Features [ i ] . Position == coord && droneState . Features [ i ] . Target ) { found = true ; } } return found ; }
Find out whether a room contains at least one target
Find out whether a room contains at least one target
//Person in room