Beispiel #1
0
		bool same_surface(const i_widget& aWidget) const
		{
			if (has_surface() && aWidget.has_surface())
				return &surface() == &aWidget.surface();
			else
				return false;
		}
Beispiel #2
0
std::string Room::can_move_in_direction(const std::string & direction_ID, const std::string & faction_ID)
{
	// if a surface is present
	if (has_surface(direction_ID))
	{
		// a player can move through the surface if it is rubble

		if (room_sides.find(direction_ID)->second.is_rubble())
		{
			return C::GOOD_SIGNAL;
		}

		return room_sides.find(direction_ID)->second.can_move_through_wall(faction_ID);
	}
	else // a surface does not exist...
	{
		// ...so the player is free to move
		return C::GOOD_SIGNAL;
	}
}