server/src/scripts/wdw-run.lua

33 lines
606 B
Lua
Raw Normal View History

function run_wdw()
2003-12-28 16:30:43 +01:00
local turnfile = "" .. get_turn()
if read_game(turnfile)~=0 then
print("could not read game")
return -1
end
2003-12-18 00:11:52 +01:00
-- run the turn (not yet)
2003-12-28 16:30:43 +01:00
read_orders(orderfile)
plan_monsters()
2003-12-28 16:30:43 +01:00
process_orders()
outfile = "" .. get_turn()
-- siegbedingungen ausgeben
dofile("wdw-standings.lua")
-- write out the initial reports (no need to run a turn)
write_passwords()
write_reports()
-- write the resulting file to 'wdw-setup'
2003-12-18 00:11:52 +01:00
if write_game(outfile)~=0 then
print("could not write game")
return -1
end
end
--
-- main body of the script
run_wdw()