2021-05-06 23:58:21 -04:00
|
|
|
local memory, movie, utime, callback, set_timer_timeout, input, gui, exec, settings = memory, movie, utime, callback, set_timer_timeout, input, gui, exec, settings
|
2021-05-03 03:23:04 -04:00
|
|
|
|
2021-05-02 01:08:32 -04:00
|
|
|
local base = string.gsub(@@LUA_SCRIPT_FILENAME@@, "(.*[/\\])(.*)", "%1")
|
2021-05-03 03:23:04 -04:00
|
|
|
local Promise = dofile(base.."/promise.lua")
|
|
|
|
callback.register('timer', function()
|
|
|
|
Promise.update()
|
|
|
|
set_timer_timeout(1)
|
|
|
|
end)
|
|
|
|
set_timer_timeout(1)
|
|
|
|
local game = dofile(base.."/game.lua")(Promise)
|
|
|
|
local util = dofile(base.."/util.lua")(Promise)
|
2021-05-07 03:35:13 -04:00
|
|
|
local serpent = dofile(base.."/serpent.lua")
|
|
|
|
|
|
|
|
game.registerHandlers()
|
|
|
|
game.getPositions()
|
2021-05-07 21:54:25 -04:00
|
|
|
|
|
|
|
game.findPreferredExit():next(function(preferredExit)
|
|
|
|
game.getWaypoints(preferredExit.x, preferredExit.y)
|
|
|
|
end)
|