![]() |
World Class ReferenceRoom (CELL) container. More...
Collaboration diagram for World: ![]()
Detailed DescriptionRoom (CELL) container.
Definition at line 33 of file World.h. Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
Definition at line 60 of file World.cpp. References m_cells. Referenced by SmallSocket::OnLine(), MobFactory::Spawn(), and ItemFactory::Spawn(). 00061 { 00062 int i = random() % m_cells.size(); 00063 CELL *p = m_cells[i]; 00064 x = p -> m_x; 00065 y = p -> m_y; 00066 name = p -> m_name; 00067 }
Definition at line 45 of file World.cpp. References m_cells. Referenced by MobFactory::MOB::Create(), and MobFactory::MOB::Move(). 00046 { 00047 for (cell_v::iterator it = m_cells.begin(); it != m_cells.end(); it++) 00048 { 00049 CELL *p = *it; 00050 if (p -> m_x == x && p -> m_y == y) 00051 { 00052 str = p -> m_name; 00053 return true; 00054 } 00055 } 00056 return false; 00057 }
Definition at line 77 of file World.cpp. References m_cells. Referenced by MobFactory::MOB::Move(), SmallHandler::ShowCell(), and SmallSocket::try_move(). 00078 { 00079 for (cell_v::iterator it = m_cells.begin(); it != m_cells.end(); it++) 00080 { 00081 CELL *p = *it; 00082 if (p -> m_x == x && p -> m_y == y) 00083 { 00084 str = p -> m_name; 00085 n = p -> m_n; 00086 s = p -> m_s; 00087 e = p -> m_e; 00088 w = p -> m_w; 00089 return true; 00090 } 00091 } 00092 return false; 00093 }
Definition at line 70 of file World.cpp. References m_cells. Referenced by MobFactory::MOB::Create(). 00071 { 00072 CELL *p = new CELL(x,y,name); 00073 m_cells.push_back(p); 00074 }
Definition at line 62 of file World.h. References m_handler. Referenced by MobFactory::MOB::Create(), and MobFactory::MOB::Move(). 00062 { return m_handler; }
Definition at line 96 of file World.cpp. References m_cells. Referenced by MobFactory::MOB::Create(). 00097 { 00098 for (cell_v::iterator it = m_cells.begin(); it != m_cells.end(); it++) 00099 { 00100 CELL *p = *it; 00101 if (p -> m_x == x && p -> m_y == y) 00102 { 00103 if (dir == "north") 00104 p -> m_n = true; 00105 else 00106 if (dir == "south") 00107 p -> m_s = true; 00108 else 00109 if (dir == "east") 00110 p -> m_e = true; 00111 else 00112 if (dir == "west") 00113 p -> m_w = true; 00114 break; 00115 } 00116 } 00117 }
Definition at line 66 of file World.h. References m_cells. Referenced by SmallHandler::ShowStatus(). 00066 { return m_cells.size(); }
Member Data Documentation
Definition at line 70 of file World.h. Referenced by AddAt(), FindAt(), GetAt(), GetRandomLocation(), NumberOfCells(), Open(), World(), and ~World().
The documentation for this class was generated from the following files: |