def loadOldGame( name ): context = GameContext() context.levels = [] filename = savefileName( name ) rv = context.load( filename ) import os os.unlink( filename ) return rv
if __name__ == '__main__': from level import * from widgets import * from gamewidget import GameWidget from timing import Simulator from ai import * import timing from grammar import Noun, ProperNoun import sys from magic import * import serialization context = GameContext() context.levels = [] serialization.initializeSerialization() # from levelgen import GeneratorQueue # context.levelGenerator = GeneratorQueue( 2, 100, 100 ) try: try: if ForceTcod: raise ImportError() import cursesui main = cursesui.main except ImportError: import tcodui main = tcodui.main main( RootMenuWidget ) finally: