mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 18:33:39 +02:00
Tidyup.
This commit is contained in:
parent
f0d0bef899
commit
ba9d51fda0
2 changed files with 8 additions and 4 deletions
3
agent.h
3
agent.h
|
@ -11,7 +11,8 @@ public:
|
||||||
class tile *tile;
|
class tile *tile;
|
||||||
class connection *conn;
|
class connection *conn;
|
||||||
|
|
||||||
agent(int id_, class tile &tile_, class connection *conn_) : id (id_), tile (&tile_), conn (conn_)
|
agent(int id_, class tile &tile_, class connection *conn_)
|
||||||
|
: id (id_), tile (&tile_), conn (conn_)
|
||||||
{
|
{
|
||||||
put_at(tile_);
|
put_at(tile_);
|
||||||
};
|
};
|
||||||
|
|
9
map.h
9
map.h
|
@ -11,7 +11,8 @@ public:
|
||||||
|
|
||||||
class agent *agent;
|
class agent *agent;
|
||||||
|
|
||||||
tile(int x_, int y_, class map &map_) : x(x_), y(y_), map(map_), agent(NULL) {};
|
tile(int x_, int y_, class map &map_)
|
||||||
|
: x(x_), y(y_), map(map_), agent(NULL) {};
|
||||||
|
|
||||||
char symbol(void);
|
char symbol(void);
|
||||||
virtual char type_symbol(void) = 0;
|
virtual char type_symbol(void) = 0;
|
||||||
|
@ -26,7 +27,8 @@ public:
|
||||||
|
|
||||||
class tile_ground : public tile {
|
class tile_ground : public tile {
|
||||||
public:
|
public:
|
||||||
tile_ground(int x_, int y_, struct map &map_) : tile(x_, y_, map_) {};
|
tile_ground(int x_, int y_, struct map &map_)
|
||||||
|
: tile(x_, y_, map_) {};
|
||||||
private:
|
private:
|
||||||
char type_symbol(void);
|
char type_symbol(void);
|
||||||
};
|
};
|
||||||
|
@ -36,7 +38,8 @@ public:
|
||||||
class tile **tiles;
|
class tile **tiles;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
|
||||||
map(int w_, int h_) : w(w_), h(h_)
|
map(int w_, int h_)
|
||||||
|
: w(w_), h(h_)
|
||||||
{
|
{
|
||||||
tiles = new class tile * [w * h];
|
tiles = new class tile * [w * h];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue