increment = 1 else: increment = 0 board.addBound(i,j+increment,1) print mouse.printBoard() commands = ('w','a','s','d','q','p') while(True): command = raw_input("wasd to move, q to quit, p to print path:") if command == 'q': break else: if command == 'w': mouse.move() elif command == 'a': mouse.turnLeft() elif command == 's': mouse.moveBack() elif command == 'd': mouse.turnRight() elif command == 'p': print mouse.AStarSearch() print mouse.printBoard() if( mouse.inGoal()): print "You win!!"