from random import randint
import time

win = GraphWin("Grid", 1000,1000)
win.setBackground('black')
obstacleList = {}
localMap = []
grid1 = Grid([50,300],[900,600],10,20,'red',win)
grid1.makeGrid()
grid2 = Grid([400,50],[600,200],3,3,'yellow',win)
grid2.makeGrid()
txt = Text(Point(500,250),'LOCAL MAP')
txt.setOutline('red')
txt.draw(win)
l = grid2.globalMap(1,1)
grid2.markCell(l[0],l[1],'yolo')

def setObstacles():
    takeObstacles()

def takeObstacles():
    while(True):
        x,y = raw_input('Eneter the obstacle cell no: ').split()
        print x,y
        if(str(x) == 'done'):
            break;
        templ = grid1.globalMap(int(x),int(y))
        grid1.markCell(templ[0],templ[1],'x')
        obstacleList[x+':'+y] = templ