Exemple #1
0
def main():
    map = HexMap(10, 8)
    graph = Graph()
    graph.edges = map.get_edges()
    came_from, cost_so_far = dijkstra_search(graph, (0, 0), (7, 3))
    path = reconstruct_path(came_from, (0, 0), (7, 3))
    print path
    print len(path)
def main():
    map = HexMap(10, 8)
    graph = Graph()
    graph.edges = map.get_edges()
    breadth_first_search(graph, (0, 0), (4, 5))