Exemplo n.º 1
0
	//构造房间
	virtual void BuildRoom(int n)
	{
        Room *room = new Room(n);
		_currentMaze->AddRoom(room);

		room->SetSide(North, new Wall);
		room->SetSide(South, new Wall);
		room->SetSide(East, new Wall);
		room->SetSide(West, new Wall);
	}
Exemplo n.º 2
0
void StandardMazeBuilder::BuildRoom(int n) {
	if (!_currentMaze->RoomNo(n)) {
		Room* room = new Room(n);
		_currentMaze->AddRoom(room);

		room->SetSide(North, new Wall);
		room->SetSide(South, new Wall);
		room->SetSide(East, new Wall);
		room->SetSide(West, new Wall);
	}
}
Exemplo n.º 3
0
 virtual void BuildRoom(int room)
 {
    if(_currentMaze != NULL && (_currentMaze->RoomNo(room) == NULL))
    {
        Room* roomA = new Room(room);
        _currentMaze->AddRoom(roomA);
        roomA->SetSide(North,new Wall);
        roomA->SetSide(South,new Wall);
        roomA->SetSide(East,new Wall);
        roomA->SetSide(West,new Wall);
    }
 }
void StandardMazeBuilder::BuildRoom(int roomNo) 
{
    if (currentMaze->RoomNo(roomNo) == NULL)
    {
        Room* room = new Room(roomNo);
        currentMaze->AddRoom(room);

        room->SetSide(North, new Wall());
        room->SetSide(South, new Wall());
        room->SetSide(East, new Wall());
        room->SetSide(West, new Wall());
    }
}