diff --git a/map.cc b/map.cc index 8dbc7e6..cb1a3ef 100644 --- a/map.cc +++ b/map.cc @@ -47,6 +47,13 @@ tile::tile_in_dir(int dir_x, int dir_y) } +void +map::on_tick(void) +{ + for (int i = 0; i < w * h; i++) + tiles[i]->on_tick(); +} + void map::print_map(void) { diff --git a/map.h b/map.h index a4fcc00..821cefc 100644 --- a/map.h +++ b/map.h @@ -55,11 +55,7 @@ public: return *tiles[y * w + x]; }; - void on_tick(void) - { - for (int i = 0; i < w * h; i++) - tiles[i]->on_tick(); - } + void on_tick(void); void print_map(void); };