Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@ppb.stat
def stat(position):
current_position = int(position)
return ppb.make_stat(position, REMOTE_CACHE[current_position], CACHE[current_position])
@ppb.next_stats
def next_stats(position):
next_moves = generate_moves(int(position))
next_positions = [do_move(int(position), nm) for nm in next_moves]
return [ppb.make_next_stat(str(next_moves[i]), str(next_positions[i]), REMOTE_CACHE[next_positions[i]], CACHE[next_positions[i]], False) for i in range(len(next_moves))]
solve(STARTING_NUMBER)
# Create an infinite while loop that waits for user input
ppb.serve()