29 lines
639 B
Python
29 lines
639 B
Python
from map import Map
|
|
import pickle
|
|
|
|
slides = []
|
|
|
|
if __name__ == "__main__":
|
|
# Generate the basic map.
|
|
map = Map()
|
|
map.generateMap()
|
|
|
|
# Add the cities
|
|
map.findCoast()
|
|
map.generateCities()
|
|
map.addCities()
|
|
|
|
# Print stuff or dump to image
|
|
#map.printWorld()
|
|
terrain, cities, coast, metadata = map.dumpMap()
|
|
gamestate = {}
|
|
gamestate['metadata'] = metadata
|
|
gamestate['terrain'] = terrain
|
|
gamestate['cities'] = cities
|
|
gamestate['coast'] = coast
|
|
gamestate['units'] = []
|
|
gamestate['fog'] = []
|
|
|
|
pickle.dump(gamestate, open("savegame.empyre_save","wb"))
|
|
#gamestate = pickle.load( open( "savegame.empyre", "rb" ) )
|