From ea4f18b6426195398ab0b53166ccaddf1d259a00 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 27 Nov 2011 00:36:07 +0100 Subject: [PATCH] map::on_tick(): Move to map.cc --- map.cc | 7 +++++++ map.h | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) 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); };