Ejemplo n.º 1
0
void RobotWorld::deleteWall( 	WallPtr aWall,
								bool aNotifyObservers /*= true*/)
{
	auto i = std::find_if( walls.begin(), walls.end(), [aWall]( WallPtr w)
	{
		return
		aWall->getPoint1() == w->getPoint1() &&
		aWall->getPoint2() == w->getPoint2();
	});
	if (i != walls.end())
	{
		walls.erase( i);

		if (aNotifyObservers == true)
		{
			notifyObservers();
		}
	}
}