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)
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)
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)
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)
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)
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)