00001 #include "MazeGame.h" 00002 #include "Builder.h" 00003 #include "Maze.h" 00004 #include "Room.h" 00005 #include "Door.h" 00006 #include "Wall.h" 00007 00008 //---- MazeGame --------------------------------------------------------- 00009 00010 MazeGame::MazeGame() : Object() { } 00011 00012 MazeGame::~MazeGame() { } 00013 00014 Maze* MazeGame::CreateMaze (MazeBuilder& builder) { 00015 builder.BuildMaze(); 00016 00017 builder.BuildRoom(1); 00018 builder.BuildRoom(2); 00019 builder.BuildDoor(1, 2); 00020 00021 return builder.GetMaze(); 00022 } 00023 /* 00024 */ 00025 Maze* MazeGame::CreateComplexMaze (MazeBuilder& builder) { 00026 builder.BuildRoom(1); 00027 // ... 00028 builder.BuildRoom(1001); 00029 00030 return builder.GetMaze(); 00031 } 00032 /* 00033 */ 00034 00035 void MazeGame::Print(int indent) { 00036 PrintIndent(indent); 00037 printf("MazeGame\n"); 00038 00039 Object::Print(indent+2); 00040 }