Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mapa
- _mundo = {}
- pos_ini = (0,0)
- def cargar_area():
- with open('mapa_pueblo.txt', 'r') as f:
- fila = f.readlines()
- x_max = len(fila[0].split('\t'))
- for y in range(len(fila)):
- cols = fila[y].split('\t')
- for x in range(x_max):
- cuadrante = cols[x].replace('\n','')
- if cuadrante == 'Pueblo_inicio':
- global pos_ini
- pos_ini = (x,y)
- _mundo[(x,y)] = None if cuadrante == '' else getatrr(__import__('mapa'), cuadrante)(x,y)
- def area_existe(x):
- return _mundo.get((x,y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement