SZI2019SmieciarzWmi/config.py

27 lines
545 B
Python
Raw Normal View History

2019-05-30 18:37:26 +02:00
import sys, random, MapGenerator
2019-04-01 10:33:32 +02:00
CELL_SIZE = 64
FPS = 60
2019-05-30 18:09:57 +02:00
DELAY = 50
2019-04-01 10:33:32 +02:00
2019-05-30 18:37:26 +02:00
try:
map_mode = sys.argv[1]
if(map_mode == "auto"):
MAP_NAME = MapGenerator.GenerateMap()
else:
MAP_NAME = map_mode
except:
print("ERROR: Invalid map mode")
sys.exit()
map = open( MAP_NAME, 'r' )
GRID_WIDTH, GRID_HEIGHT = [int(x) for x in map.readline().split()]
GC_X, GC_Y = [int(x) for x in map.readline().split()]
2019-04-01 10:33:32 +02:00
WINDOW_HEIGHT = GRID_HEIGHT * CELL_SIZE
WINDOW_WIDTH = GRID_WIDTH * CELL_SIZE
HOUSE_CAPACITY = random.randint(1, 11)