Exemple #1
0
def next_way(playerLocation, coins):
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1,-1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)
Exemple #2
0
def next_way(playerLocation, coins):
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1, -1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)
Exemple #3
0
def next_way(playerLocation, coins):
    """  ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏­­ ͏   ͏   ͏ ­ ­ ­ ͏   ͏   ­ ­ ͏   ͏ ­  ͏͏ ͏­­ ͏ ­ ­­  ͏ ­ ͏ ­  ͏͏ ͏ ͏ ͏­­ ­ ͏ ͏   ͏ ͏ ­   ͏­͏ ͏ ­ ͏   ͏͏  ͏­͏ ͏    ͏­ ͏­  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏ ­ ͏͏  ͏ ­ ͏͏   ͏­ ­    ­   ͏­ ­   ­͏͏  ­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏­  ͏   ͏͏  ͏­͏ ͏   ͏ ­ ͏­͏ ͏­­ ­   ͏   ͏­͏ ͏͏   ­­  ­­ ͏ ͏ ͏͏  ͏­  ͏    ­­  ­­ ͏­  ͏ ͏ ­ ͏ ͏ ͏ ͏­  ͏ ͏ ­   ­   ͏ ͏ ͏­  ­͏  ͏ ͏ ͏͏  ͏   ͏͏  ͏ ͏ ͏   ͏­  ͏­͏ ­ ­ ­   ͏   ­ ͏ ­   ­ ­ ­ ­ ͏͏  ­   ͏͏  ͏͏  ͏ ­ ͏   ͏   ͏ ͏ ͏ ­ ͏͏   ­  ­͏͏  ͏͏ ͏   ͏   ͏   ͏   ͏ ͏ ­­   ͏­ ͏­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏­  ͏   ͏͏  ͏­͏ ͏   ͏   ­ ͏ ͏   ͏­  ͏͏  ͏ ͏ ­   ͏­͏ ͏ ­ ͏   ͏͏­ ͏   ͏ ­ ͏­͏  ­­  ­­ ͏   ͏­­ ͏ ­  ­­  ­­ ͏ ­ ͏͏  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ­   ­ ­ ­͏  ­ ­ ͏͏  ͏͏   ­   ͏͏ ͏   ͏   ͏   ͏   ͏­­ ͏ ­ ͏͏­ ­­  ͏ ­ ͏ ­ ͏­͏ ͏͏͏ ͏­­ ͏͏  ͏­͏ ͏͏  ͏ ͏  ͏­ ͏͏   ­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏   ͏͏  ͏­͏ ͏   ­ ͏ ͏   ͏­͏ ͏ ­ ͏   ͏͏  ­   ͏­  ͏­  ͏   ͏­͏ ͏͏  ͏ ͏ ͏͏  ͏­  ­ ͏ ͏͏  ͏͏   ͏͏ ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏­  ͏   ͏   ͏͏  ͏­͏ ͏   ͏   ͏­͏ ­   ͏­  ͏   ­ ͏ ͏   ­   ͏   ͏͏   ͏­ ­ ­ ­ ͏ ͏­  ͏   ­   ­ ͏ ­   ͏­  ͏   ­͏  ­   ­ ­ ͏­  ͏   ­   ­ ­ ­ ­  ­  ͏͏  ­͏͏ ͏   ͏­­ ͏ ­ ͏   ­­  ͏   ͏­­ ͏ ­ ͏­͏ ­ ͏ ͏   ­   ͏­  ͏   ͏ ­ ͏   ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ͏   ͏͏  ͏­  ­ ­ ­   ­ ͏ ͏͏  ͏͏  ͏͏  ͏͏   ͏͏ ͏   ­͏  ͏   ͏ ­ ͏͏  ͏ ­ ͏ ­ ͏­͏ ͏͏͏ ͏­­ ͏͏  ͏­͏ ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ͏͏  ͏­͏ ­   ͏͏  ͏­­ ͏ ­  ͏­ ͏͏  ­͏͏ ͏͏  ͏͏­ ­    ­  ͏­  ­   ͏͏  ͏͏  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏   ͏͏  ͏­͏ ͏   ­ ͏ ͏   ͏­͏ ͏ ­ ͏   ͏͏  ­   ͏­  ͏­  ͏   ͏­͏ ͏͏  ͏­­ ͏ ­ ͏͏  ͏­  ­   ͏͏  ͏͏  ͏͏   ͏͏
    Cette fonction܁ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏­­ ­ ­  ͏͏ ͏ ͏ ­ ͏ ͏­­ ͏­  ͏   ­ ­ ­   ͏ ͏ ­   ­ ͏ ͏­­ ͏ ­ ͏   ­ ­ ­ ­ ͏   ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏͏  ͏   ͏ ­ ͏͏­  ­­ ͏­­ ­   ­   ­   ­   ­   ͏­  ͏       ͏­­ ­   ͏   ͏­͏ ͏­  ͏        ͏           ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­   ͏͏ ͏ ͏ ­ ͏ ͏­­ ͏­  ͏   ­܁
    est܁   ͏͏  ͏­  ͏   ͏   ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ­ ­ ͏­  ͏   ͏   ­    ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏­­ ͏   ͏   ͏ ­ ­ ­  ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏͏  ͏   ­ ­ ͏͏  ͏­  ͏͏  ͏ ͏  ͏͏  ͏͏ ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­   ­ ­ ͏   ͏­  ­   ͏   ͏   ͏   ͏  ܁
    plutot܁ ͏­  ͏­­ ­   ­   ͏͏  ͏   ­­  ͏ ͏ ͏   ͏   ͏   ͏­­ ­ ­ ͏­͏ ͏ ­ ͏   ­   ­   ­   ͏͏  ͏   ͏͏  ͏͏  ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ­ ͏ ͏͏  ­   ͏͏  ͏͏   ͏͏ ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏   ­   ͏͏  ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­ ͏ ͏   ͏   ͏   ͏­  ͏͏  ͏­͏ ͏͏­ ͏   ͏­  ͏ ͏ ͏   ͏­­ ­   ­ ͏ ͏܁
    cool܁­­ ͏ ­ ͏­­ ͏   ­ ­ ͏­­ ͏   ­͏  ͏   ͏ ͏ ͏   ͏   ͏   ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ­ ͏ ͏͏  ­   ͏͏  ͏͏   ͏͏  ͏͏ ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­   ­ ­ ­   ­ ͏ ͏   ͏   ͏   ͏­  ­   ͏   ͏ ͏ ͏͏­ ͏   ­ ­ ­   ­ ͏ ͏͏  ­   ­͏  ­ ͏܁
    en effet tout est dedans܁ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏   ͏͏­ ͏   ͏ ͏ ͏   ­­  ͏   ͏ ­ ­ ͏ ͏   ­   ͏   ͏­  ͏­­ ͏   ͏ ­ ͏͏   ͏­ ­   ͏­  ­͏   ­   ­  ͏͏­ ͏͏  ͏ ­ ͏   ­­  ͏   ͏ ­ ­ ͏ ͏   ­   ͏   ͏­  ͏­­ ͏   ͏ ­  ͏­ ­   ͏­  ­͏   ­   ­  ͏͏­ ͏ ­ ͏ ͏ ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏͏   ͏͏ ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ­܁
    mais il faut faire attention܁­  ͏    ͏­ ­   ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ­   ͏   ͏͏  ͏­͏ ͏   ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ͏͏  ͏ ͏ ͏   ͏͏  ͏­͏ ­   ͏͏  ­   ͏͏  ͏   ͏­͏ ͏­­ ­   ͏   ͏͏  ͏­͏ ͏   ͏͏  ͏­­ ­ ­ ͏­͏ ͏ ­ ͏   ­   ­   ͏͏  ͏   ͏͏  ͏͏  ͏­  ͏   ͏͏  ͏­͏ ­   ͏͏  ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏͏   ­   ͏͏  ͏͏  ͏͏ ͏   ͏   ͏ ͏ ͏   ͏­͏ ͏­­ ­   ͏͏ ܁
    car sinon on ne pourra rien décoder܁ ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ­   ͏­  ͏­  ͏   ­ ­ ­   ͏   ͏ ­ ͏͏­ ͏͏  ­͏͏  ͏͏ ͏   ͏   ͏   ͏   ­   ͏   ­ ­ ­ ­  ͏͏  ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­       ­         ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏܁
    de plus les jours nous sont comptés܁͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­  ͏   ­   ­  ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­           ͏  ­  ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏ ܁
    """
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1, -1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)
Exemple #4
0
def next_way(playerLocation, coins):
    """  ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏­­ ͏   ͏   ͏ ­ ­ ­ ͏   ͏   ­ ­ ͏   ͏ ­  ͏͏ ͏­­ ͏ ­ ­­  ͏ ­ ͏ ­  ͏͏ ͏ ͏ ͏­­ ­ ͏ ͏   ͏ ͏ ­   ͏­͏ ͏ ­ ͏   ͏͏  ͏­͏ ͏    ͏­ ͏­  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏ ­ ͏͏  ͏ ­ ͏͏   ͏­ ­    ­   ͏­ ­   ­͏͏  ­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏­  ͏   ͏͏  ͏­͏ ͏   ͏ ­ ͏­͏ ͏­­ ­   ͏   ͏­͏ ͏͏   ­­  ­­ ͏ ͏ ͏͏  ͏­  ͏    ­­  ­­ ͏­  ͏ ͏ ­ ͏ ͏ ͏ ͏­  ͏ ͏ ­   ­   ͏ ͏ ͏­  ­͏  ͏ ͏ ͏͏  ͏   ͏͏  ͏ ͏ ͏   ͏­  ͏­͏ ­ ­ ­   ͏   ­ ͏ ­   ­ ­ ­ ­ ͏͏  ­   ͏͏  ͏͏  ͏ ­ ͏   ͏   ͏ ͏ ͏ ­ ͏͏   ­  ­͏͏  ͏͏ ͏   ͏   ͏   ͏   ͏ ͏ ­­   ͏­ ͏­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏­  ͏   ͏͏  ͏­͏ ͏   ͏   ­ ͏ ͏   ͏­  ͏͏  ͏ ͏ ­   ͏­͏ ͏ ­ ͏   ͏͏­ ͏   ͏ ­ ͏­͏  ­­  ­­ ͏   ͏­­ ͏ ­  ­­  ­­ ͏ ­ ͏͏  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ­   ­ ­ ­͏  ­ ­ ͏͏  ͏͏   ­   ͏͏ ͏   ͏   ͏   ͏   ͏­­ ͏ ­ ͏͏­ ­­  ͏ ­ ͏ ­ ͏­͏ ͏͏͏ ͏­­ ͏͏  ͏­͏ ͏͏  ͏ ͏  ͏­ ͏͏   ­  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏   ͏͏  ͏­͏ ͏   ­ ͏ ͏   ͏­͏ ͏ ­ ͏   ͏͏  ­   ͏­  ͏­  ͏   ͏­͏ ͏͏  ͏ ͏ ͏͏  ͏­  ­ ͏ ͏͏  ͏͏   ͏͏ ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏­  ͏   ͏   ͏͏  ͏­͏ ͏   ͏   ͏­͏ ­   ͏­  ͏   ­ ͏ ͏   ­   ͏   ͏͏   ͏­ ­ ­ ­ ͏ ͏­  ͏   ­   ­ ͏ ­   ͏­  ͏   ­͏  ­   ­ ­ ͏­  ͏   ­   ­ ­ ­ ­  ­  ͏͏  ­͏͏ ͏   ͏­­ ͏ ­ ͏   ­­  ͏   ͏­­ ͏ ­ ͏­͏ ­ ͏ ͏   ­   ͏­  ͏   ͏ ­ ͏   ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ͏   ͏͏  ͏­  ­ ­ ­   ­ ͏ ͏͏  ͏͏  ͏͏  ͏͏   ͏͏ ͏   ­͏  ͏   ͏ ­ ͏͏  ͏ ­ ͏ ­ ͏­͏ ͏͏͏ ͏­­ ͏͏  ͏­͏ ͏͏  ͏ ­ ͏͏  ­ ͏ ͏͏  ͏͏  ͏­͏ ­   ͏͏  ͏­­ ͏ ­  ͏­ ͏͏  ­͏͏ ͏͏  ͏͏­ ­    ­  ͏­  ­   ͏͏  ͏͏  ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ͏͏  ͏   ͏͏  ͏­͏ ͏   ­ ͏ ͏   ͏­͏ ͏ ­ ͏   ͏͏  ­   ͏­  ͏­  ͏   ͏­͏ ͏͏  ͏­­ ͏ ­ ͏͏  ͏­  ­   ͏͏  ͏͏  ͏͏   ͏͏
    Cette fonction܁ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏­­ ­ ­  ͏͏ ͏ ͏ ­ ͏ ͏­­ ͏­  ͏   ­ ­ ­   ͏ ͏ ­   ­ ͏ ͏­­ ͏ ­ ͏   ­ ­ ­ ­ ͏   ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏͏  ͏   ͏ ­ ͏͏­  ­­ ͏­­ ­   ­   ­   ­   ­   ͏­  ͏       ͏­­ ­   ͏   ͏­͏ ͏­  ͏        ͏           ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­   ͏͏ ͏ ͏ ­ ͏ ͏­­ ͏­  ͏   ­܁
    est܁   ͏͏  ͏­  ͏   ͏   ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ­ ­ ͏­  ͏   ͏   ­    ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏ ­ ͏­­ ͏   ͏   ͏ ­ ­ ­  ͏͏ ͏͏  ͏­  ­   ͏­­ ­ ͏ ­   ͏   ͏͏  ͏   ­ ­ ͏͏  ͏­  ͏͏  ͏ ͏  ͏͏  ͏͏ ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­   ­ ­ ͏   ͏­  ­   ͏   ͏   ͏   ͏  ܁
    plutot܁ ͏­  ͏­­ ­   ­   ͏͏  ͏   ­­  ͏ ͏ ͏   ͏   ͏   ͏­­ ­ ­ ͏­͏ ͏ ­ ͏   ­   ­   ­   ͏͏  ͏   ͏͏  ͏͏  ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ­ ͏ ͏͏  ­   ͏͏  ͏͏   ͏͏ ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏   ­   ͏͏  ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­ ͏ ͏   ͏   ͏   ͏­  ͏͏  ͏­͏ ͏͏­ ͏   ͏­  ͏ ͏ ͏   ͏­­ ­   ­ ͏ ͏܁
    cool܁­­ ͏ ­ ͏­­ ͏   ­ ­ ͏­­ ͏   ­͏  ͏   ͏ ͏ ͏   ͏   ͏   ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ­ ͏ ͏͏  ­   ͏͏  ͏͏   ͏͏  ͏͏ ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ­­  ͏   ͏­­ ­ ­ ͏­͏ ­   ͏­­ ­   ͏   ͏­͏ ͏͏  ͏ ͏ ­   ­ ­ ­   ­ ͏ ͏   ͏   ͏   ͏­  ­   ͏   ͏ ͏ ͏͏­ ͏   ­ ­ ­   ­ ͏ ͏͏  ­   ­͏  ­ ͏܁
    en effet tout est dedans܁ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏   ͏͏­ ͏   ͏ ͏ ͏   ­­  ͏   ͏ ­ ­ ͏ ͏   ­   ͏   ͏­  ͏­­ ͏   ͏ ­ ͏͏   ͏­ ­   ͏­  ­͏   ­   ­  ͏͏­ ͏͏  ͏ ­ ͏   ­­  ͏   ͏ ­ ­ ͏ ͏   ­   ͏   ͏­  ͏­­ ͏   ͏ ­  ͏­ ­   ͏­  ­͏   ­   ­  ͏͏­ ͏ ­ ͏ ͏ ͏͏  ͏­͏ ­ ͏ ͏   ͏   ͏   ͏͏  ͏͏  ͏­͏ ­ ­ ­   ͏­  ͏͏  ­   ͏͏  ͏͏   ͏͏ ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ­܁
    mais il faut faire attention܁­  ͏    ͏­ ­   ͏   ͏ ͏ ͏­­ ­ ͏ ͏   ­   ͏   ͏͏  ͏­͏ ͏   ͏   ͏­͏  ­­ ­   ͏͏  ͏   ͏   ͏͏  ͏ ͏ ͏   ͏͏  ͏­͏ ­   ͏͏  ­   ͏͏  ͏   ͏­͏ ͏­­ ­   ͏   ͏͏  ͏­͏ ͏   ͏͏  ͏­­ ­ ­ ͏­͏ ͏ ­ ͏   ­   ­   ͏͏  ͏   ͏͏  ͏͏  ͏­  ͏   ͏͏  ͏­͏ ­   ͏͏  ­   ­͏  ­ ͏ ͏   ­    ­­ ­   ͏͏  ͏   ͏͏  ͏͏   ­   ͏͏  ͏͏  ͏͏ ͏   ͏   ͏ ͏ ͏   ͏­͏ ͏­­ ­   ͏͏ ܁
    car sinon on ne pourra rien décoder܁ ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ­   ͏­  ͏­  ͏   ­ ­ ­   ͏   ͏ ­ ͏͏­ ͏͏  ­͏͏  ͏͏ ͏   ͏   ͏   ͏   ­   ͏   ­ ­ ­ ­  ͏͏  ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­       ­         ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏܁
    de plus les jours nous sont comptés܁͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­  ͏   ­   ­  ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏    ­           ͏  ­  ͏­  ͏   ͏­͏ ͏­­ ­   ͏͏  ͏͏   ͏͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏ ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏͏  ­ ­ ͏͏  ͏ ­ ͏­͏ ͏   ͏­  ͏­͏   ­  ͏ ܁
    """
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1,-1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)
Exemple #5
0
def next_way(playerLocation, coins):
    """
    Cette fonction
    est
    plutot
    cool
    en effet tout est dedans
    mais il faut faire attention
    car sinon on ne pourra rien décoder
    de plus les jours nous sont comptés
    """
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1,-1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)
Exemple #6
0
def next_way(playerLocation, coins):
    """
    Cette fonction
    est
    plutot
    cool
    en effet tout est dedans
    mais il faut faire attention
    car sinon on ne pourra rien décoder
    de plus les jours nous sont comptés
    """
    candidates = algo.dijkstra(mazeMap, playerLocation)
    dist = float("inf")
    coin = (-1, -1)
    for c in coins:
        if candidates[1][c] < dist:
            dist = candidates[1][c]
            coin = c
    coins.remove(coin)
    return u.way_width(candidates[0], playerLocation, coin)