00001 #include "MazeFactory.h" 00002 #include "Maze.h" 00003 #include "Wall.h" 00004 #include "Room.h" 00005 #include "Door.h" 00006 00007 //---- MazeFactory --------------------------------------------------------- 00008 00009 MazeFactory::MazeFactory() : Object() { } 00010 00011 MazeFactory::~MazeFactory() { } 00012 00013 class Maze * MazeFactory::MakeMaze() const { 00014 return new Maze(); 00015 } 00016 00017 class Wall * MazeFactory::MakeWall() const { 00018 return new Wall(); 00019 } 00020 00021 class Room * MazeFactory::MakeRoom(int n) const { 00022 return new Room(n); 00023 } 00024 00025 class Door * MazeFactory::MakeDoor(class Room * r1, class Room * r2) const { 00026 return new Door(r1, r2); 00027 } 00028 00029 void MazeFactory::Print(int indent) { 00030 PrintIndent(indent); 00031 printf("MazeFactory\n"); 00032 00033 Object::Print(indent+2); 00034 }