-- Lua script of map bugs/1566_hole_axis_missing/map_2.

local map = ...
local game = map:get_game()
local hero = map:get_hero()

function map:on_opening_transition_finished()

  assert_equal(hero:test_obstacles(), false,
      "Hero should not be stuck in an obstacle after falling into the hole")

  -- The hero fell through the center cell of the hole (a 16x16 area exactly
  -- matching the hero's own bounding box), so it should be clamped to
  -- exactly that same cell here, away from the walls surrounding it.
  assert_equal_position(hero, 152, 157)

  sol.main.exit()
end
