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

local sensor_activated = false

function map:on_opening_transition_finished()
    game:simulate_command_pressed("right")
end

---When the hero has reach the other side of separator from left
function assert_right:on_activated()
    game:simulate_command_released("right")
    assert(sensor_activated, "Sensor overlapping separator should have been activated from left side")

    sensor_activated = false
    game:simulate_command_pressed("left")
end

---When the hero has reach the other side of separator from right
function assert_left:on_activated()
    game:simulate_command_released("left")
    assert(sensor_activated, "Sensor overlapping separator should have been activated from right side")

    sol.main.exit()
end

---The sensor overlapping the separator we want to test
function sns_1:on_activated()
    sensor_activated = true
end
