On Mar 30, 9:10?pm, "Daniel T." <danie...@earthlink.net> wrote:
What about the LevelMap class? I'm wondering if "GenerateLevel" should
be in LevelMap instead of a separate function.
What code have you written so far?
LevelMap looks like this:
class LevelMap {
private:
...
public:
u16 getWidth() const
<inline>
u16 getHeight() const
<inline>
LevelTile& operator()(u16 y, u16 x)
<inline>
LevelTile operator()(u16 y, u16 x) const
<inline>
LevelMap();
LevelMap(u16, u16, int);
~LevelMap();
};
Not all that much, just wraps up a 2D grid of tiles (stored with
std::vector), with operators to access it like a matrix and get
the size (with guaranteed boundschecking enabled on debug builds
by using std::vector::at() in the operators for such builds).
Not yet implemented but will be at some point: save/load a map
to/from a disk file, load a predefined map template.
Even if I were to put GenerateLevel in LevelMap, what about the
whole RoomMaker thing?
for LevelTiles. IMHO it doesn't even deserve mention in a design
diagram. Maybe you can show me the LevelTile class or one of the classes