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

function map:on_opening_transition_finished()

  local state = sol.state.create()
  local on_finished_called = false

  function state:on_finished()
    on_finished_called = true
  end

  hero:start_state(state)

  function game:on_finished()
    assert(on_finished_called, "state:on_finished() was not called when the game finished")
  end

  sol.timer.start(map, 100, function()
    sol.main.exit()
  end)
end
