//构造房间 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); }
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); } }
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()); } }