richelbilderbeek / djog_unos_2018

Project by the Uno's at DJOG 2018-2019: Nature Zen
GNU General Public License v3.0
6 stars 2 forks source link

Game freezes at 3484 ticks due to a test #617

Closed robkruger closed 5 years ago

robkruger commented 5 years ago

Is your feature request related to a problem? Please describe. Currently the game freezes at 3484 ticks due to a test. I found the test which is causing this:

  //#define FIX_ISSUE_617
  #ifdef FIX_ISSUE_617
  //Two grasses should merge to one mountain
  {
    // Create a game with two grassland blocks on top of each other
    // +====+====+    +----+----+
    // || grass || -> |mountains|
    // +====+====+    +----+----+
    const std::vector<tile> tiles
    {
      //   x    y    z    r    type         ID
      tile(0.0, 0.0, 0.0, 0.0, 0.0, tile_type::grassland, tile_id()),
      tile(0.0, 0.0, 0.0, 0.0, 0.0, tile_type::grassland, tile_id())
    };

    game g(tiles);
    sound_type st { sound_type::none };
    assert(count_n_tiles(g) == 2);
    assert(collect_tile_types(g)[0] == tile_type::grassland);
    assert(collect_tile_types(g)[1] == tile_type::grassland);
    g.process_events(st);
    assert(count_n_tiles(g) == 1);
    assert(collect_tile_types(g)[0] == tile_type::hills);
  }
  #endif

Describe the solution you'd like Fix the test

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

AramPetiet commented 5 years ago

Doesn't happend on develop anymore (at least on my pc) 💯

richelbilderbeek commented 5 years ago

Same here, will close this Issue

2019-05-31-212934_1722x910_scrot