All pastes #267889 Raw Edit

wut sup

public cpp v1 · immutable
·published 2006-12-05 04:13 UTC
rendered paste body
Robot* Valley:: otherRobotAt(Robot* rp) const{		for( int i=0; i<m_nrobots; i++) 	{		if (rp->row()==m_robots[i]->row() && rp->col()==m_robots[i]->col()) 		{	int minpos=0;			for(int j=0;j<MAXSOURCES;j++) 			{				if(m_sources[j]<= m_sources[minpos])					minpos=j; 			}			return m_robots[minpos];		}		else 		{			return NULL;		}	}}