#If neighbouring tile is a diagonal tile, check to see if diagonal movement will cut corners... if world[current.y][current.x+_x].symbol == "X" or world[current.y+_y][current.x].symbol == "X": continue neighbor.symbol = "#" g = current.g_score + (14 if abs(_x) + abs(_y) == 2 else 10) V = neighbor.visited if not V or g < neighbor.g_score: neighbor.visited = True neighbor.parent = current neighbor.h_score = h_score(neighbor, end) neighbor.g_score = g if not V: open_nodes.enqueue(neighbor) else: open_nodes.readjust(neighbor) #print neighbor.info() #display_world() #raw_input(":") for step in path[::-1]: world[step.y][step.x].symbol = '.' display_world()