Robot* Valley:: otherRobotAt(Robot* rp) const { for( int i=0; irow()==m_robots[i]->row() && rp->col()==m_robots[i]->col()) { int minpos=0; for(int j=0;jenergy()<=m_robots[minpos]->energy()) minpos=j; } return m_robots[minpos]; } else { return NULL; } } } } } }