moved forward checking and arc consistency to grid.py