All pastes #128172 Raw Edit

Miscellany

public text v1 · immutable
#128172 ·published 2006-08-12 19:52 UTC
rendered paste body
#include <string>
#include "room.h"

Room::Room(std::string const &RName) : Name(RName) { }

Room::Room(Room const &r) : Name(r.Name) { }

Room::~Room() { }

void Room::AddExit(Room * r)
{
	Exits.push_back(r);
}

void Room::RemoveExit(Room * r)
{
	std::vector<Room *>::iterator i;
	for(i = Exits.begin(); i != Exits.end(); ++i)
	{
		if(i == r)
		{
			Exits.erase(i);
			return;
		}
	}
}