diff --git a/_posts/2018-04-22-bzhctf18.md b/_posts/2018-04-22-bzhctf18.md index 7fe93ba..6afd1f5 100644 --- a/_posts/2018-04-22-bzhctf18.md +++ b/_posts/2018-04-22-bzhctf18.md @@ -310,13 +310,13 @@ def convert_path_to_relative_moves(p): dx = p[0][0] - p[1][0] dy = p[0][1] - p[1][1] if dx < 0: # right - return 'l'+recompute_path(p[1:]) + return 'l'+convert_path_to_relative_moves(p[1:]) elif dx > 0: # left - return 'j'+recompute_path(p[1:]) + return 'j'+convert_path_to_relative_moves(p[1:]) elif dy < 0: # bottom - return 'k'+recompute_path(p[1:]) + return 'k'+convert_path_to_relative_moves(p[1:]) elif dy > 0: # up - return 'i'+recompute_path(p[1:]) + return 'i'+convert_path_to_relative_moves(p[1:]) while True: # get input