MCPcopy Create free account
hub / github.com/CleverRaven/Cataclysm-DDA / for_each_tile

Method for_each_tile

tests/map_test_case.cpp:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void map_test_case::for_each_tile( const tripoint &tmp_origin,
52 const std::function<void( map_test_case::tile & )> &callback ) const
53{
54 int width = get_width();
55 int height = get_height();
56
57 tile tile;
58
59 for( int y = 0; y < height; ++y ) {
60 for( int x = 0; x < width; ++x ) {
61 tile.setup_c = setup[y][x];
62 tile.expect_c = expected_results[y][x];
63 tile.p = tmp_origin + point( x, y );
64 tile.p_local = point( x, y );
65 callback( tile );
66 }
67 }
68}
69
70void map_test_case::for_each_tile( const std::function<void( tile )> &callback )
71{

Callers 3

test_allMethod · 0.80
test_reachabilityFunction · 0.80

Calls 1

pointClass · 0.70

Tested by

no test coverage detected